mts_pull: Extract a column of metadata or data

View source: R/mts_pull.R

mts_pullR Documentation

Extract a column of metadata or data

Description

This function acts similarly to dplyr::pull() working on mts$meta or mts$data. Data are returned as a simple array. Data are pulled from whichever dataframe contains var.

Usage

mts_pull(mts = NULL, var = NULL)

Arguments

mts

mts object.

var

A variable name found in the meta or data dataframe of the incoming mts time series object.

Value

An array of values.

Examples

library(MazamaTimeSeries)

# Metadata
example_mts %>%
  mts_pull("communityRegion") %>%
  table() %>%
  sort(decreasing = TRUE)

# Data for a specific ID
example_mts %>%
  mts_pull("da4cadd2d6ea5302_4686")


MazamaTimeSeries documentation built on June 8, 2025, 2 p.m.