I want to get the length of a list, that's an element in another list.
first = c("Aa","Bbb")
print(length(first)) # expect 2, gives 2 -> ok
texts = list(first,"Ccc",c("Dd","Eeeee","Fff")) # put elements into texts
print(length(texts)) # expect 3, gives 3 -> ok
print(lengths(texts)) # expect 2 1 3, gives 2 1 3 -> ok
print(length(texts[1])) # expect 2, gives 1 -> ???
In the last line, I expect 2 = the length of element "first" but R gives 1. I do not understand, what happens. How can I get the correct value of the length of a specific element of the outer list?