I have input and a subset to see only rows with position 4 or 5 in a column called CODE. Then I selected this data to be able to look at a specific view. Then I made sure that the entries in the DATE column were read as a date, and not as a factor (which was the default). Then I draw two columns against each other:
ph<-read.csv(url("http://luq.lternet.edu/data/lterdb88/data/Lfdp1-ElVerdePhenology.txt"))
ftsd<-subset(ph, ph$CODE %in% c("4","5"))
DACEXC<-subset(ftsd, ftsd$SPECIES %in% "DACEXC")
DACEXC$DATE<-as.Date(DACEXC$DATE, format="%m/%d/%y")
plot(DACEXC$DATE,DACEXC$NUMBER)
The data goes from 1992 to 2007, and I would like to build one year at a time. I will do this for many species, but I cannot figure out how to do this. I tried a number of things, including limiting the x axis or trying to make a subset of just one year, but didn't get it. I tried some of the following ideas:
plot(DACEXC$DATE,DACEXC$NUMBER, xlim=c(1992,1993))
plot(DACEXC$DATE,DACEXC$NUMBER, xlim=c(01/01/1992,12/31/1992))
plot(DACEXC$DATE,DACEXC$NUMBER, xlim=c(1992:1993))
DACEXC92<-subset(DACEXC92, DATE==1992)
DACEXC92
[1] DATE BASKET SPECIES CODE NUMBER
<0 rows> (or 0-length row.names)
, , .
DACEXC92<-subset(DACEXC92, DATE==04/01/92)
DACEXC92
[1] DATE BASKET SPECIES CODE NUMBER
<0 rows> (or 0-length row.names)
, , ?