There is a string: s <- '[[1,2,3],[2,5,6]]'
I use package jsonlite to:
s <- fromJSON(s)
s <- split(s, row(s))
Then, I get a matrix like this:
A matrix: 2 × 3 of type int
1 2 3
2 5 6
I hope I can use as.character(s[1]) to make s[1] become '1,2,3'. However I get this '1:3'
as.character(s[1])
'1:3'
What should I do?