On 2012-07-19 05:56, penguins wrote:
Thanks William, that works fantastically!
I had a quick play with my data and have realised a potential problem in
that if an individual ends the series at home it records an additional
trip-no when one wasnt made. I was wondering whether you could think of a
Thanks William, that works fantastically!
I had a quick play with my data and have realised a potential problem in
that if an individual ends the series at home it records an additional
trip-no when one wasnt made. I was wondering whether you could think of a
way to alter it slightly so that the i
essage-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf Of penguins
> Sent: Wednesday, July 18, 2012 10:13 AM
> To: r-help@r-project.org
> Subject: [R] conditional increase by increment
>
> I am trying to assign increasing trip numb
I am trying to assign increasing trip numbers to a binary variable ("land";
1=home and 0=away) where a string of 1's shouldn't increment the trip_no
more than once.
For example; based on
land<-c(0,0,0,0,1,1,1,0,0,0,1,1,0,0,0,0)
the "trip_no" sequence produced should be 1,1,1,1,2,2,2,2,2,2,3,3,
4 matches
Mail list logo