Top "Zoo" questions

zoo is an R package that provides an S3 class with methods for totally ordered indexed observations.

R: merge two irregular time series

I have two multivariate time series x and y, both covering approximately the same range in time (one starts two …

r datetime merge time-series zoo
Merging data - Error in fix.by(by.x, x)

I am trying to merge data in R as suggested in an answer to my other post here. Yet, I …

r merge na zoo data-files
Replace NA with previous or next value, by group, using dplyr

I have a data frame which is arranged by descending order of date. ps1 = data.frame(userID = c(21,21,21,22,22,22,23,23,23), color = c(…

r dplyr missing-data zoo
How to exclude one column from data.table OR convert to data.table to MTS

When using data.table is it possible to return all the columns except one, like in data.frame? If the …

r data.table zoo
Rollapply for time series

I am trying to calculate the rolling 20 period historical volatility. I take the daily returns: ret<-ROC(data1) And …

r zoo
Date format for plotting x axis ticks of time series data

The data files have date is the format i.e. 1975M1, 1975M2, ... 2011M12 for time series data. when plotting this …

r date plot zoo
Access zoo or xts index

I am using zoo objects, buy my question also applies to xts objects. It looks to me like it is …

r xts zoo
Calculate rolling correlation using rollapply

I have zoo object with 10000+ rows. > head(tt) A B 2007-01-04 0.005945924 0.0021167475 2007-01-05 -0.004201991 -0.0080020024 2007-01-08 0.001740897 0.0045804104 2007-01…

r zoo
R convert between zoo object and data frame, results inconsistent for different numbers of columns?

I have difficulty switching between data frames and zoo objects, particularly keeping meaningful column names, and inconsistencies between univariate and …

r dataframe zoo
Convert data.frame to zoo

I want to convert a data.frame to a zoo object. My df looks like that: > (str(StockPriceReturns)) 'data.…

r statistics zoo