Description Usage Arguments Details See Also Examples
melt
1 2 |
x |
a |
aggregate |
aggregatiom time interval expressed in seconds |
FUN |
function used for time aggregation. See
|
na.rm |
logical value. If |
offset |
time interval offset from the start point used for time aggregation (expressed in seconds). |
tz |
time zone. Default iis |
... |
further arguments |
Function melt
applied to a list of zoo
object returned by
get.geotop.inpts.keyword.value
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | library(reshape2)
set.seed(1223)
tz="A"
start <- as.POSIXlt("2003-02-01 UTC",tz=tz)
end <- as.POSIXlt("2006-02-28 UTC",tz=tz)
time <- seq(from=start,to=end,by=3600)
x1 <- as.data.frame(array(rnorm(length(time)*2),c(length(time),2)))
x2 <- as.data.frame(array(rnorm(length(time)*2),c(length(time),2)))
names(x1) <- sprintf("VAR%02d",1:ncol(x1))
names(x2) <- sprintf("VAR%02d",1:ncol(x1))
x1 <- as.zoo(x1)
x2 <- as.zoo(x2)
index(x1) <- time
index(x2) <- time
x <- list(x1,x2)
str(x)
outA <- meltFromZooList(x,aggregate=3600*24,FUN=mean)
outB <- meltFromZooList(x,aggregate=3600*24,FUN=max)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.