eval() function is used to evaluate an expression, not a string, as in your case "6+6" is a string. So to convert a string into the expression you need to use parse() with text=<string>
> eval(parse(text="6+6"))
[1] 12
> class("6+6")
[1] "character"
> class(parse(text="6+6"))
[1] "expression"
> class(eval(parse(text="6+6")))
[1] "numeric"
If you face an error in eval(), use this syntax after executing the above code:
main <- function ()
{
returnStringValue <- "ignore"
return (returnStringValue)
}