s
> > case 3.5) in a vector.
> >
> > which(diff(cumsum(diff(data<3.5)==1)<2)!=0)+2
> >
> > HTH
> > Petr
> >
> >
> >
> > On 23 Aug 2006 at 11:23, zhijie zhang wrote:
> >
> > Date sent: Wed, 23 Aug 2006 11:23:03
==1)<2)!=0)+2
HTH
Petr
On 23 Aug 2006 at 11:23, zhijie zhang wrote:
Date sent: Wed, 23 Aug 2006 11:23:03 +0800
From: "zhijie zhang" <[EMAIL PROTECTED]>
To: R-help@stat.math.ethz.ch
Subject: [R] how to comp
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