Extracts elements from a list of named lists by element name.
Arguments
- xs
[
list]
A list of named lists.- element
[
character]
Name of element(s) to extract from the list elements ofxs. What happens is this:x$el1$el2.....- element.value
[any]
If given,vapplyis used and this argument is passed toFUN.VALUE. Note that even for repeated indexing (if length(element) > 1) you only pass one value here which refers to the data type of the final result.- simplify
[
logical(1)| character(1)]
IfFALSElapplyis used, otherwisesapply. If “cols”, we expect the elements to be vectors of the same length and they are arranged as the columns of the resulting matrix. If “rows”, likewise, but rows of the resulting matrix. Default isTRUE.- use.names
[
logical(1)]
IfTRUEandxsis named, the result is named asxs, otherwise the result is unnamed. Default isTRUE.