Re: [R] Split dataframe by year

2014-02-11 Thread John Kane
-Original Message- From: zilefacel...@yahoo.com Sent: Mon, 10 Feb 2014 08:58:11 -0800 (PST) To: r-help@r-project.org, r-help-requ...@r-project.org Subject: [R] Split dataframe by year Hi, I have a dataframe in R and would like to split the data (1900-1980) into two sets

[R] Split dataframe by year

2014-02-10 Thread Zilefac Elvis
Hi, I have a dataframe in R and would like to split the data (1900-1980) into two sets. For example, one dataframe should have data from 1900-1960 and the other from 1961-1980. Thanks for your help. AT. [[alternative HTML version deleted]] __

Re: [R] Split dataframe by year

2014-02-10 Thread Rich Shepard
On Mon, 10 Feb 2014, Zilefac Elvis wrote: I have a dataframe in R and would like to split the data (1900-1980) into two sets. For example, one dataframe should have data from 1900-1960 and the other from 1961-1980. If you want two separate dataframes (while leaving the original), subset()

Re: [R] Split dataframe by year

2014-02-10 Thread Jeff Newmiller
Suggestions: Read the posting guide mentioned at the bottom of this email. Note request to post in plain text and provide reproducible example. Knowing how your data are constructed allows us to make more concrete suggestions as to how Rio solve your problem. Read help files: ?%in%, ?subset,