Skip to content
Prev 296092 / 398506 Next

Extracting rows from a dataset

Hello,

Try the following.

ix <- apply(dat, 1, function(x) x[1] == 1 && sum(diff(x) != 0) > 1)
dat[ix, ]


Hope this helps,

Rui Barradas

Em 30-05-2012 22:45, arun escreveu: