I don't understand how time series objects are created in R.
I have data: data = c(101,99,97,95,93,91,89,87,85,83,81) (smaller dataset for the sake of brevity).
This data is taken once every day for 11 days starting from 2016-07-05 to 2016-07-15. According to the docs, the frequency for data sampled daily should be 7. But I do not understand the values for start and end parameters. For start, docs say:
the time of the first observation. Either a single number or a vector of two integers, which specify a natural time unit and a (1-based) number of samples into the time unit. I do not understand what 1-based number of samples means. I tried to google it but it didn't help.
If I just use 2016,7 as the start and end date, I just get:
Time Series:
Start = c(2016, 7)
End = c(2016, 7)
Frequency = 7
[1] 101
If I use 2016,7,1 and 2016,7,11 as the start and end date, I still get the same output.
What am I doing wrong?