[R] List of Lists
hadley wickham
h.wickham at gmail.com
Wed Jan 14 22:35:34 CET 2009
On Wed, Jan 14, 2009 at 1:53 PM, glenn <g1enn.roberts at btinternet.com> wrote:
> Dear All;
>
> Is it possible to create a list of lists (I am sure it is) along these
> lines;
>
> I have a dataframe data02 that holds a lot of information, and the first
> column is ³date²
>
> I have a list of dates in;
>
> data03<-c(date1,.....,daten)
>
> And would like to create a list;
>
> data04 <- subset(data02, date == data03[1,])
>
> Ie. data04 holds the data from data02 that matches a date in data03
>
> How do I create a list data04 that instead rolls through all the elements of
> data03 and each element of data04 is a list
Have a look at ?split.
Hadley
--
http://had.co.nz/
More information about the R-help
mailing list