Displaying 1 result from an estimated 1 matches for "time01".
Did you mean:
time0
2011 Mar 11
1
dataframe to a timeseries object
...zone = 'GMT', units = as.character(x$ID[1])),
envir = env)
return(TRUE)
}
}
fooBy <- function(...)
{
e1 <- new.env(parent = baseenv())
res <- by(X, X$ID, buildTimeSeriesFromDataFrame,
env = e1, simplify = TRUE)
return(get("xx", e1))
}
Time01 <- replicate(100,
system.time(fooBy(X,
X$ID, buildTimeSeriesFromDataFrame,
simplify = TRUE))[[1]])
median(Time01)
hist(Time01)
library(xts)
buildXtsFromDataFrame <- function(x, env)
{
{
if(exists("xx", envir = env))
assign("xx",
cbind(get(&...