monitor_toCSV: Convert monitor data as CSV

View source: R/monitor_toCSV.R

monitor_toCSVR Documentation

Convert monitor data as CSV

Description

Converts the contents of the monitor argument to CSV. By default, the output is a text string with "human readable" CSV that includes both meta and data. When saved as a file, this format is useful for point-and-click spreadsheet users who want to have everything on a single sheet.

To obtain a machine parseable CSV string for just the data, you can use includeMeta = FALSE. To obtain machine parseable metadata, use includeData = FALSE.

Usage

monitor_toCSV(monitor, includeMeta = TRUE, includeData = TRUE)

Arguments

monitor

mts_monitor object.

includeMeta

Logical specifying whether to include monitor$meta.

includeData

Logical specifying whether to include monitor$data.

Value

CSV formatted text.

Examples

library(AirMonitor)

monitor <-
  Carmel_Valley %>%
  monitor_filterDate(20160802, 20160803)

monitor_toCSV(monitor) %>% cat()
monitor_toCSV(monitor, includeData = FALSE) %>% cat()
monitor_toCSV(monitor, includeMeta = FALSE) %>% cat()


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