Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in R Programming by (50.2k points)

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?

1 Answer

0 votes
by (107k points)

In R programming you can use the eval() and parse() functions from base R. 

string <- 'list(a = c("b", "c"))'

eval&#40;parse(text = string&#41;)

#$a

#[1] "b" "c"

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...