R List: How to get the length from a list stored in a key-value list? -
If I store a list or vector in a key-value list, the length of the list returns from length 1 is (). Why? How to organize a list or vector in a key-value list? & gt; I & lt; -c (0,1,2,3,4) & gt; Length (i) [1] 5> L & LT; - List (R = 2, I = I) & gt; L ["Eye"] $ i [1] 0 1 2 3 4 & gt; Length (L ["I"]) [1] 1
length (L $ I) what you want ... < / P>
& gt; I & lt; -c (0,1,2,3,4) & gt; I & lt; -c (0,1,2,3,4) & gt; L & LT; - List (R = 2, I = I) & gt; L [ii] $ r [1] 2 $ i [1] 0 1 2 3 4 $ & lt; NA & gt; Tap $ & lt; NA & gt; NULL & gt; L $ i [1] 0 1 2 3 4 & gt; Length (L $ i) [1] 5
Comments
Post a Comment