I have a large dataset (temp) with measurements every ten minutes over several years. The column "value" also contains NAs. How can I create a proper timeseries-object? I tried to use the ts () function but I just did not manage to find out which frequency would fit my data set. I want to do correlation and analysation od trends / periodicity / seasonality afterwards.
> dput(head(temp))
structure(list(TS = structure(c(874659600, 874660200, 874660800,
874661400, 874662000, 874662600), class = c("POSIXct", "POSIXt"
), tzone = "UTC"), value = c(2.77268641140869, 2.77268641140869,
2.77268641140869, 2.77268641140869, 2.71474135464008, 2.71474135464008
)), row.names = c(NA, 6L), class = "data.frame")
If you need to change frequency, you need to decide it yourself or according to existing cases. You can use
na.approx()fromzoopackage to interpolate 'value' and get rid of NAs.