[R] how to make a sub list from a long list using the component name?

From: <szhan_at_uoguelph.ca>
Date: Sat 03 Dec 2005 - 03:33:34 EST


Hello, R users,
I have a long list with over 20,000 elements (say foo), now I want to make a sub list of 30 elements from this list using the component names such as subname<-c( "a", "b", "d", "f", "g", "h", "o", "q",...). One way to do it is to make rest of elements in the list NULL, that is too silly. Is there another way to make the sub list?
Thanks
Joshua



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Dec 03 10:26:26 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:28 EST