Skip to content
Prev 311749 / 398503 Next

R help..subsetting data frame that meeting multiple criteria

Hello,

Like the following?

dat <- read.table(text="
value class percent
15526 36 4.6875
15527 62 85.9375
15527 82 32.4564
15528 36 70.3125
15528 62 9.375
15528 82 74.6875
", header = TRUE)

per70 <- dat$percent > 70
split(dat, list(dat$class, per70))

Hope this helps,

Rui Barradas
Em 23-11-2012 21:14, prasmas escreveu: