Displaying 2 results from an estimated 2 matches for "pricez".
Did you mean:
price
2023 Jan 16
1
Reg: Frequency in declaring time series data
Dear All,
I have a time series daily data with date are stored ( %dd-%mm-%yy format )
from 22-01-20 to 03-08-21. In total I have 560 observations. I am using the
following command to declare as a time series object. Here the the data set
is 7 days a week.
oil <- read_xlsx("crudefinal.xlsx")
pricet=ts(oil$price, start = c(2020, 22), freq = 365)
2023 Jan 16
0
Reg: Frequency in declaring time series data
...= "1 day", length.out = 560)
>>
>> # base R
>> pricet <- ts(oil$price, start = c(2020, 22), freq = 365)
>> time(pricet)
>> index(pricet)
>> plot(pricet)
>>
>> #---
>>
>> library(zoo)
>> library(ggplot2)
>>
>> pricez <- zoo(oil$price, order.by = oil$date)
>> time(pricez)
>> index(pricez)
>> autoplot(pricez)
>>
>> vignette(package = "zoo")
>>
>>
>> Hope this helps,
>>
>> Rui Barradas
>>
>>
>>
>
Hello,
Please always cc...