I am working with a data set that has a column which I have turned into a list that looks like this:
[[997]]
[1] NA
[[998]]
[1] "0.99" " 0.99" " 0.99" " 0.99" " 0.99" " 2.99"
[[999]]
[1] "19.99" " 9.99" " 4.99" " 79.99" " 15.99" " 14.99" " 99.99" " 7.99"
[9] " 59.99" " 49.99"
[[1000]]
[1] NA
I need to count how many components are in each element of a list and save these values in a matrix. For example, in 999 the output should be 10 and in 1000 the output should be 0. Can anyone suggest a function that could help? Thank you.