Displaying 2 results from an estimated 2 matches for "time03".
Did you mean:
time0
2011 Apr 04
3
How to speed up grouping time series, help please
...aster than 'by' function
tsDaply <- function(...)
{
library(plyr)
e1 <- new.env(parent = baseenv()) #create a new env
res <- daply(X, "ID", buildTimeSeriesFromDataFrame,
env = e1)
return(get("xx", e1)) # return xx from env
}
##replicate 100 times
#Time03 <- replicate(100,
# system.time(tsDaply(X, X$ID))[[1]])
#median(Time03)
# result
tsDaply(X, X$ID)
Thanks in advance for any input, best regards,
Den
2011 Mar 11
1
dataframe to a timeseries object
I?m wondering which is the most efficient (time, than memory usage) way to obtain a multivariate time series object from a data frame (the easiest data structure to get data from a database trough RODBC).
I have a starting point using timeSeries or xts library (these libraries can handle time zones), below you can find code to test.
Merging parallelization (cbind) is something I?m thinking at