How can I convert the list of strings a to list of lists b as
a = list('A', 'B', 'C')
and the converted to
b = list(list('A'), list('B'), list('C'))
using R? Thanks.
>Solution :
Apply the function list to the list a:
lapply(a, list)
[[1]]
[[1]][[1]]
[1] "A"
[[2]]
[[2]][[1]]
[1] "B"
[[3]]
[[3]][[1]]
[1] "C"