mts_select | R Documentation |
This function acts similarly to dplyr::select()
working on
mts$data
. The returned mts object will contain only those
time series identified by deviceDeploymentID
in the order specified.
This can be used the specify a preferred order and is helpful when using faceted plot functions based on ggplot such as those found in the AirMonitorPlots package.
mts_select(mts = NULL, deviceDeploymentID = NULL)
mts |
mts object. |
deviceDeploymentID |
Vector of timeseries unique identifiers. |
A reordered (subset) of the incoming mts time series object.
(A list with meta
and data
dataframes.)
mts_selectWhere
library(MazamaTimeSeries)
# Filter for "El Monte"
El_Monte <-
example_mts %>%
mts_filterMeta(communityRegion == "El Monte")
ids <- El_Monte$meta$deviceDeploymentID
rev_ids <- rev(ids)
print(ids)
print(rev_ids)
rev_El_Monte <-
example_mts %>%
mts_select(rev_ids)
print(rev_El_Monte$meta$deviceDeploymentID)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.