resample_TS: resample time series data at a lower resolution

View source: R/resample_TS.r

resample_TSR Documentation

resample time series data at a lower resolution

Description

resample time series data at a lower resolution

Usage

resample_TS(df, tstep, nsims)

Arguments

df

data.frame holding the time series data to be resampled, including a 'datetime'-vector (in POSIXct-format and UTC).

tstep

numeric vector indicating the resampling resolution (in seconds).

nsims

number of simulated datasets to be generated. If missing, the maximum number of datasets will be returned, based on a moving window of the temporal resolution of the input dataset.

Author(s)

Robert K. Bauer

See Also

plot_TS

Examples

### load sample depth and temperature time series data from miniPAT:
ts_file <- system.file("example_files/104659-Series.csv",package="RchivalTag")
ts_df <- read.table(ts_file, header = TRUE, sep = ",")
head(ts_df)
ts_df$datetime <- as.POSIXct(strptime(paste(ts_df$Day, ts_df$Time), 
                              "%d-%b-%Y %H:%M:%S",tz = "UTC"))

tsims <- resample_TS(ts_df,600)
length(tsims)


RchivalTag documentation built on Nov. 10, 2023, 5:06 p.m.