Learn R Programming

MazamaTimeSeries (version 0.3.0)

sts_combine: Combine multiple sts time series objects

Description

Create a merged timeseries using of any number of sts objects for a single sensor. If sts objects are non-contiguous, the resulting sts will have gaps.

An error is generated if the incoming sts objects have non-identical deviceDeploymentIDs.

Usage

sts_combine(..., replaceMeta = FALSE)

Value

A SingleTimeSeries sts time series object containing records from all incoming sts time series objects. (A list with meta and data dataframes.)

Arguments

...

Any number of valid SingleTimeSeries sts objects associated with a single deviceDeploymentID.

replaceMeta

Logical specifying whether to allow replacement of metadata.

Examples

Run this code
library(MazamaTimeSeries)

aug01_08 <-
  example_sts %>%
  sts_filterDate(20180801, 20180808)

aug15_22 <-
  example_sts %>%
  sts_filterDate(20180815, 20180822)

aug01_22 <- sts_combine(aug01_08, aug15_22)

plot(aug01_22$data$datetime)

Run the code above in your browser using DataLab