Trying to create a time series from real data from EV charging points with POSIXct and charge time. Data covers a period of several years, but I am looking to analyse one year. Encountering two errors firstly when I create the xts object, and attempt to use decompose to assess seasonality :
Error in decompose(X) : time series has no or less than 2 periods
and secondly when I try to create an acf for the ts:
Error in if (frequency > 1 && 0 < (d <- abs(frequency - round(frequency))) && :
missing value where TRUE/FALSE needed
My data, as it is real has readings at uneven time intervals (hundreds of thousands of charge events across a year), and i would expect it to exhibit seasonality in weekly, daily, monthly intervals etc. I am not specifying a frequency when creating xts, which could be the source of the first error.
any help would be appreciated, I am new to R and this probably is a fairly fundamental error(s) .