[R] ts or xts with high-frequency data within a year
Ryan Utz
utz.ryan at gmail.com
Wed Mar 30 17:43:34 CEST 2016
Sorry about not providing code; I didn't think to just simulate dummy code.
Here's a situation where I have <1 year of data, hourly time sampling, and
the error that I get using my actual data:
###
X=as.data.frame(1:6000)
X[2]=seq.POSIXt(ISOdate(2015,11,1),by='hour',length.out=6000)
X[3]=sample(100,size=6000,replace=T)
Y=xts(X[,3],order.by=X[,2])
decompose(Y)
Z=ts(X[,2],start=c(2015,11),frequency=24*365)
plot(decompose(Z))
###
Am I missing something obvious here? I hope so...
--
Ryan Utz, Ph.D.
Assistant professor of water resources
*chatham**UNIVERSITY*
Home/Cell: (724) 272-7769
[[alternative HTML version deleted]]
More information about the R-help
mailing list