meltFromZooList: meltFromZooList

Description Usage Arguments Details See Also Examples

Description

melt

Usage

1
2
meltFromZooList(x, aggregate = 3600 * 24, FUN = mean, na.rm = TRUE,
  offset = 0, tz = "A", ...)

Arguments

x

a zoo object

aggregate

aggregatiom time interval expressed in seconds

FUN

function used for time aggregation. See aggregate.zoo.

na.rm

logical value. If TRUE (default) NA vaues will be not considered

offset

time interval offset from the start point used for time aggregation (expressed in seconds).

tz

time zone. Default iis "A".

...

further arguments

Details

Function melt applied to a list of zoo object returned by get.geotop.inpts.keyword.value.

See Also

melt

Examples

 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)

ecor/geotoppoints documentation built on May 15, 2019, 10:05 p.m.