[R] vectorization of rolling function

2014-12-06 Thread A Duranel
Hello I use R to run a simple model of rainfall interception by vegetation: rainfall falls on vegetation, some is retained by the vegetation (part of which can evaporate), the rest falls on the ground (quite crude but very similar to those used in SWAT or MikeSHE, for the hydrologists among you). I

[R] Plotting multivariate time-series with ggplot2

2013-08-11 Thread A Duranel
Hello all. Let's say I have a multivariate time-series, obtained from 2 loggers returning a numeric value and a factor giving additional information about this numeric value, for instance its accuracy: data<-data.frame(date=rep(seq(from=as.Date("2012-01-01"), by=1, length.out=100), 2), logger=c(re

[R] overlaying zoo plots in lattice

2013-01-11 Thread A Duranel
Hello Let's say I have a multivariate zoo timeseries (synchronised automatic loggers at different places): library(zoo) library(lattice) library(latticeExtra) x<-zoo(data.frame(a=rnorm(100), c=rnorm(100), b=rnorm(100)), seq(from=as.Date("2010-01-01"), by="day", length.out=100)) and a dataframe

Re: [R] cex.lab ignored in plot.zoo for multiple plots

2012-09-11 Thread A Duranel
Sep 05, 2012; 6:39pm — by David Winsemius David Winsemius >> a problem with the plot.zoo function. In the parameters of the function, >> cex.lab is ignored. I tried to reduce the size of the yaxis labels by at >> least 50%. >> Example: >> >> sample <- as.zoo(EuStockMarkets) >> >> par(las=1) >> >>