[R] how to complete this task on data management

From: zhijie zhang <epistat_at_gmail.com>
Date: Wed 23 Aug 2006 - 13:23:03 EST


Dear friends,
 When i clean my dataset , i met a difficulty  suppose my data set is :
*> data<-data.frame(x=c(1:5,1,2,3))
> data

  x
1 1
2 2
3 3
4 4
5 5*
6 1
7 2
8 3
Now i need to add the data which are less than 3.5 at the bottom, not including the top data, so the results should be :   x
1 1
2 2
3 3
4 4
5 5
*6 6*
I tried to use " data[data$x>3.5,]" to do it , but it also delete the first several numbers,* How to finish it ?*
Thanks very much.

-- 
Kind Regards,
Zhi Jie,Zhang

	[[alternative HTML version deleted]]

______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.
Received on Wed Aug 23 13:27:15 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 23 Aug 2006 - 22:21:37 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.