[R] Extracting from a list XXXX
R. Michael Weylandt
michael.weylandt at gmail.com
Wed Jan 4 04:48:23 CET 2012
I imagine this is about as brief as one can be.
as.character(sapply(XXX, `[`, 1))
Michael
On Tue, Jan 3, 2012 at 9:44 PM, Dan Abner <dan.abner99 at gmail.com> wrote:
> Hello everyone,
>
> Can someone please suggest the most succinct method for extracting the
> first value from each component of a list and saving the resulting vector
> as a character vector?
>
> Thank you,
>
> Dan
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list