rollPAM | R Documentation |
This function merges all the data to a given output resolution and then progresses along the timeseries and creates summary statistics within a pre-defined time window. Can interpolate or not. Interpolations is only recommended if the analysis cannot handle NAs and if the window is smaller than the data (e.g. magnetic) with the worst temporal resolution
rollPAM(dta, interp = TRUE, resolution_out = 15, window = 120, units = "mins")
dta |
PAM data to be used in the analysis |
interp |
By default TRUE. Whether or not to interpolate NAs in dataset that the rollapply is used on. |
resolution_out |
Temporal resolution of output dataset. By defaukt 15 mins. Must be in minutes unless the units are changed |
window |
Window over which to apply the rolling window. By defaukt 120 mins. Equivalent to zoo::rollapply(,width = window,) Must be in minutes unless the units are changed |
units |
By default"mins", but also supports "hours" and "secs" |
a dataframe of derived metrics including the median, standard deviation, minimum, maximum, cumulative difference and range over the period
#data(swift)
#PAM_data = swift
## crop the data to get rid of no good periods
#start = as.POSIXct("2016-09-01","%Y-%m-%d", tz="UTC")
#end = as.POSIXct("2017-04-21","%Y-%m-%d", tz="UTC")
#PAM_data = cutPAM(PAM_data, start, end)
#TOclassify = rollPAM(dta = list(pressure = PAM_data$pressure,
# acceleration = PAM_data$acceleration),
# resolution_out = 60 ,
# window = 24*60)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.