Re: [R] dividing the data

From: Marianne Promberger <>
Date: Fri, 23 May 2008 23:02:23 +0100

On 05/23/08 14:34, kayj wrote:
> hello,
> I have data of individuals; with their age and other infromation. Each row
> corresponds to a single individual. I would like to divide the data and
> store them into two files. one file with people less than 50 years of age
> and the other with people more than 50 years of age.

Assuming you have your data in a dataframe x with one column called "age" (get the data into R e.g. with read.csv)

young <- x[x$age < 50,]




Marianne Promberger
Graduate student in Psychology

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 23 May 2008 - 22:06:02 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 23 May 2008 - 23:30:40 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive