The variable(s) in ...
are used to specify columns of
mts$meta
to use for ordering. Under the hood, this
function uses arrange
on mts$meta
and then
reorders mts$data
to match.
mts_arrange(mts, ...)
mts object.
variables in mts$meta
.
A reorderd version of the incoming mts time series object.
(A list with meta
and data
dataframes.)
library(MazamaTimeSeries)
example_mts$meta$latitude[1:10]
#> [1] 34.04576 34.09559 34.05742 34.07114 34.05452 34.06881 34.07055 34.07032
#> [9] 34.07068 34.06667
# Filter for all labels with "SCSH"
byElevation <-
example_mts %>%
mts_arrange(latitude)
byElevation$meta$latitude[1:10]
#> [1] 34.04297 34.04469 34.04576 34.04799 34.04986 34.05253 34.05437 34.05451
#> [9] 34.05452 34.05742