[R] putting data.frame values in new dataframes

MacQueen, Don macqueen1 at llnl.gov
Mon Jan 14 16:28:54 CET 2013


Perhaps

  split(mydf, paste(mydf$month,mydf$day))

-- 
Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062





On 1/14/13 5:57 AM, "condor" <radonnikodym at hotmail.nl> wrote:

>I have a very dataset which I want to put in new dataframes according to
>date. Example:
>Suppose I have
>
>   number day month hours
>1       1  14    10     2
>2       2  14    10    12
>3       3  14    10    18
>4       4  15    10     3
>5       5  15    10    14
>6       6  16    10    18
>7       7  16    10    20
>8       8  16    10    23
>9       9  20    10     1
>10     10  21    10    14
>11     11  21    10    15
>
>Now I want to get 5 new data frames, with first one
>   number day month hours
>1       1  14    10     2
>2       2  14    10    12
>3       3  14    10    18
>
>etc.
>
>Is there an efficient way to do this? Thanks for the help
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/putting-data-frame-values-in-new-dataframes-
>tp4655474.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>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