Hi to all
I need a subset for values if there are f.e 3 values successive in a
column of a Data Frame:
Example from the subset help page:
subset(airquality, Temp > 80, select = c(Ozone, Temp))
29 45 81
35 NA 84
36 NA 85
38 29 82
39 NA 87
40 71 90
41 39 87
42 NA 93
43 NA 92
44 23 82
.....
I would like to get only
...
40 71 90
41 39 87
42 NA 93
43 NA 92
44 23 82
....
because the left column is ascending more than f.e three times without gap
Any hints for a package or do I need to build a own function?
Kind Regards Knut
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.