> change <- c(NA, diff(q1$..1))
> will be 1 when ..1 goes from FALSE
> to TRUE, -1 for TRUE to FALSE, 0 for no change, and NA
> for the first element. You may find it convenient to
> change that NA to something else or to not deal with
> the first element after computing the diff.
>
>
This is very helpful, I did not know about the notation V$..1
I can find no documentation for it, but it works.
cheers
Worik
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.