i don't understand how time series objects created in r. have data: data = c(101,99,97,95,93,91,89,87,85,83,81)
(smaller dataset sake of brevity). data taken once every day 11 days starting 2016-07-05
2016-07-15
. according docs, frequency data sampled daily should 7. not understand values start
, end
parameters. start
, docs say: the time of first observation. either single number or vector of 2 integers, specify natural time unit , (1-based) number of samples time unit.
not understand 1-based number of samples
means. tried google didn't help.
if use 2016,7
start , end date, get:
time series: start = c(2016, 7) end = c(2016, 7) frequency = 7 [1] 101
if use 2016,7,1
, 2016,7,11
start , end date, still same output.
what doing wrong?
i think best way switch xts or zoo, since according question here, ts() struggles daily observations, since number of days varies between years.
Comments
Post a Comment