I want to apply decompose function in R on weekly collected data.For instance I am giving the example on that I have worked along with the error I am getting:
>v<-c(50,45,23,21,32,24,42)
>vtimeseries<-ts(v)
>vtimeseries
Time Series:
Start = 1
End = 30
Frequency = 1
>decompose(vtimeseries)
Error in decompose(vts) : time series has no or less than 2 periods
Can anyone please help me out of this problem.And also give some light on how to set the frequency value in the ts(). I want to decompose the time series data as
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
... .... .... ... ... ... ...
My main purpose of doing so is to find the seasonal and trend component for the time series data.