[R] to extract data
Roslina Zakaria
zroslina at yahoo.com
Mon Apr 20 08:59:43 CEST 2009
Hi R-users,
I have a set of data from 1958-2009, how do I extract the data from 1927 and 2007?
beechworth.dt
Year Month Rain
1 1858 3 21.8
2 1858 4 47.0
3 1858 5 70.1
4 1858 6 78.7
5 1858 7 101.6
6 1858 8 129.8
7 1858 9 80.8
8 1858 10 41.9
...
2009 ......
I tried:
beechworth.dt.2 <- beechworth.dt[beechworth.dt$Year=="1927":"2007",]
and got
Warning message:
In beechworth.dt$Year == "1927":"2007" :
longer object length is not a multiple of shorter object length
Thank you so much for any help given.
More information about the R-help
mailing list