monitor_pull: Extract a column of metadata or data

View source: R/monitor_pull.R

monitor_pullR Documentation

Extract a column of metadata or data

Description

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

Usage

monitor_pull(monitor = NULL, var = NULL)

Arguments

monitor

mts_monitor object.

var

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

Value

An array of values.

Examples

library(AirMonitor)

# Metadata
Camp_Fire %>%
  monitor_pull("deploymentType") %>%
  table()

# Data for a specific ID
Camp_Fire %>%
  monitor_dailyStatistic(mean) %>%
  monitor_pull("6bbab08e3786ef66_840060450006") %>%
  round(0)

# Associated dates
Camp_Fire %>%
  monitor_dailyStatistic(mean) %>%
  monitor_pull("datetime")


AirMonitor documentation built on Sept. 27, 2024, 9:06 a.m.