Back
I just want to pass a line of code in textInput function, like say for instance I write:
list(a = c("b", "c"))
in the textInput. But textInput would take it as a character string.
Is there any way to do it?
In R programming you can use the eval() and parse() functions from base R.
string <- 'list(a = c("b", "c"))'eval(parse(text = string))#$a#[1] "b" "c"
string <- 'list(a = c("b", "c"))'
eval(parse(text = string))
#$a
#[1] "b" "c"
31k questions
32.8k answers
501 comments
693 users