Accessing elements in list in r -


I want to use a certain element in a list, and want to store it in data.frame. If the particular object does not have that element then the result should be. Example:

  list $ a "mark" "peter" "sam" "il" $ b "dd" "pp" "tt" "ff" "j J "RR" $ c "aa" a "a" a "a" a "a"  
<

result (data frame):

  name The value of  

NA> Any RR BAC

Any suggestions?

< Div class = "post-text" itemprop = "text">

You can sapply and use the data frame

  # list l <- list (A = C ("Icon", "Peter" C "C" ("AA", "AA", "CAM", "IL"), B = C (" DD "," PP "," TT "," FF "," JJ "," RR ") Remove the sixth element in each vector ridge  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -