Looks good, but there are some ways in which I think you’re making it more
complicated than necessary.
Two calls to plot(), with plot.new() in between, is definitely not needed.
Recalculating LAI_simulation$Date three times should not be needed.
## create example data
day0 <- as.Date('2009-10-7'
Thanks it worked for me. I wanted to plot days since planting on
x-axis 1 and years on x-axis 3.
LAI_simulation$Date <- as.Date( LAI_simulation$Date, '%Y/%m/%d')
LAI_simulation$Date <- as.integer(LAI_simulation$Date - as.Date("2009-10-07"))
plot(LAI~Date,data=LAI_simulation,xlab="Days since Oct, 7
How about
> difftime(LAI_simulation$Date, LAI_simulation$Date[1], units="days")
Time differences in days
[1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13
-
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
-Origin
3 matches
Mail list logo