well, first you could have a look at
?"[.data.frame"
?subset
and then check the following:
dat <- data.frame(year = sample(seq(2000, 2008, 2), 100, TRUE), y =
rnorm(100))
subset(dat, year == 2002)
dat[dat$year == 2002, ]
# or
subset(dat, year > 2002)
dat[dat$year > 2002, ]
I hope it helps.
Josh
You are wanting to subset the data so try help(subset) or ?subset. And
follow the See also which refers to '['. You might also find the
introductory manual helpful. Most of the contributed documentation on
CRAN (the comprehensive R archive network) will cover this with
examples. I found Pa
2 matches
Mail list logo