1

I have a character:

 x <- 'c(1, 2, 3)'

I'm trying to convert it to a vector in one line using the eval function:

 print(class(eval(x)))

but the result is still a character:

 [1] "character"
Kevin
  • 1,103
  • 10
  • 33

0 Answers0