0

I have data in which one column has a string value in all the rows of that column like.

list(id = '123', status = c('xyz', 'abc', 'pqrs', 'tuvw'))

To convert it into a list, I'm using.

eval(parse(text = "xyz$a))

But it's returning only the value of the first row, and I want to change it for the whole column. I tried using a for loop, but except for the first row, it generates "NULL."

Akhil Jha
  • 1
  • 2
  • 1
    Try `lapply(xyz$a, function(x) eval(parse(text = x)))`. It would be easier to help with a proper [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input we can copy/paste into R to test with. – MrFlick Jun 21 '21 at 23:02

0 Answers0