Top "Zoo" questions

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

R: Filling missing dates in a time series?

I have a zoo time series with missing days. In order to fill it and have a continuous series I …

r time-series fill zoo
How to analyse irregular time-series in R

I have a zoo time series in R: d <- structure(c(50912, 50912, 50912, 50912, 50913, 50913, 50914, 50914, 50914, 50915, 50915, 50915, 50916, 50916, 50916, 50917, 50917, 50917, 50918, 50918, 2293.8, 2302.64, 2310.5, 2324.02, 2312.25, 2323.93, 2323.83, 2338.67, 2323.1, 2320.77, 2329.73, 2319.63, 2330.86, 2323.38, 2322.92, 2317.71, 2322.76, 2286.64, 2294.83, 2305.06, 55.9, 62.8, 66.4, 71.9, 59.8, 65.7, 61.9, 67.9, 38.5, 36.7, 43.2, 30.3, 42.4, 33.5, 48.8, 52.7, 61.2, 30, 41.7, 50, 8.6, 9.7, 10.3, 11.1, 9.2, 10.1, 9.6, 10.4, 5.9, 5.6, 6.6, 4.7, 6.5, 5.2, 7.5, 8.1, 9.5, 4.6, 6.4, 7.7, 9.29591864400155, 10.6585128174944, 10.4386464748912, 11.5738448647708, 10.9486074772952, 10.9546547052814, 10.3733963771546, 9.15627378048238, 8.22993822910891, 5.69045896511178, 6.95269658370746, 7.78781665368086, 7.20089569039135, 4.9759716583555, 8.99378907920762, 10.0924594632635, 10.3909638115674, 6.28203685114275, 9.16021859457356, 7.56829801052175, 0.695918644001553, 0.9585128174944, 0.138646474891241, 0.473844864770827, 1.74860747729523, 0.854654705281426, 0.773396377154565, -1.24372621951762, 2.32993822910891, 0.0904589651117833, 0.352696583707458, 3.08781665368086, 0.700895690391349, -0.224028341644497, 1.49378907920762, 1.99245946326349, 0.890963811567351, 1.68203685114275, 2.76021859457356, -0.131701989478247), .Dim = c(20L, 6L), .…

r time-series zoo
Read xts from CSV file in R

I'm trying to read time series from CSV file and save them as xts to be able to process them …

r time-series zoo xts
Using rollmean when there are missing values (NA)

I have a data set which has a couple of NA in it. I take a rolling mean and expect …

r xts zoo
Write xts/zoo object to csv with index

> library(PerformanceAnalytics) > data(managers) > class(managers) [1] "xts" "zoo" > head(managers) HAM1 HAM2 HAM3 HAM4 HAM5 HAM6 …

r xts zoo
Filling in missing (blanks) in a data table, per category - backwards and forwards

I am working with a large data set of billing records for my clinical practice over 11 years. Quite a few …

r data.table zoo missing-data
Creating regular 15-minute time-series from irregular time-series

I have an irregular time-series (with DateTime and RainfallValue) in a csv file C:\SampleData.csv: DateTime,RainInches 1/6/2000 11:59,0 1/6/2000 23:59,0.01 1/7/2000 11:59,0 1/13/2000 23:59,0 1/14/2000 0:00,0 1/14/2000 23:59,0 4/14/2000 3:07,0.01 4/14/2000 3:12,0.03 4/14/2000 3:19,0.01 12/31/2001 22:44,0 12/31/2001 22:59,0.07 12/31/2001 23:14,0 12/31/2001 23:29,0 12/31/2001 23:44,0.01 12/31/2001 23:59,0.01 Note: The …

r time-series xts zoo
R/zoo: index entries in ‘order.by’ are not unique

I have a .csv file containing 4 columns of data against a column of dates/times at one-minute intervals. Some timestamps …

r date time-series zoo
Rolling Standard Deviation in a Matrix in R

Bellow is a stock daily returns matrix example (ret_matriz) IBOV PETR4 VALE5 ITUB4 BBDC4 PETR3 [1,] -0.040630825 -0.027795652 -0.052643733 -0.053488685 …

r matrix zoo standard-deviation rollapply
R: adding 1 month to a date

I want to get the date sequence between a startDate and endDate by adding 1 month to the startDate. ie, if …

r dataframe xts zoo r-rook-package