list.util | R Documentation |
Functions to handle manipulation of list.
list2df(x)
un.list(x, y="")
shrink.list(x)
x |
A list to be manipulated. |
y |
A character or string of separator. |
list2df
converts a list with components of vector to a data
frame. Shorter vectors will be filled with
NA. It is useful to convert rugged vectors into a data frame which can
be written to an Excel file.
un.list
collapses higher-depths list to 1-depth list.
This function uses recursive programming skill to tackle any depths
of list.
shrink.list
removes all NULL or NA entries from a list.
list2df
returns a data frame.
un.list
returns a list.
shrink.list
retuns a list.
Wanchang Lin
feat.mfs
## See examples of function feat.mfs for the usages of list2df and un.list.
a <- list(x=1, y=NA, z=NULL)
b <- list(x=1, y=NA)
c <- list(x=1, z=NULL)
shrink.list(a)
shrink.list(b)
shrink.list(c)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.