monitor_print: Print monitor data as CSV

View source: R/monitor_print.R

monitor_printR Documentation

Print monitor data as CSV

Description

Prints out the contents of the ws_monitor object as 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 machine parseable CSV strings you can use metaOnly or dataOnly which are mutually exclusive but which return CSV strings that can be automatically ingested.

By default, the CSV formatted text is printed to the console as well as returned invisibly but not saved to a file unless saveFile is specified.

Usage

monitor_print(
  ws_monitor,
  saveFile = NULL,
  metaOnly = FALSE,
  dataOnly = FALSE,
  quietly = FALSE
)

Arguments

ws_monitor

ws_monitor object

saveFile

optional filename where CSV will be written

metaOnly

flag specifying whether to return ws_monitor$meta only as a machine parseable CSV

dataOnly

flag specifying whether to return ws_monitor$data only as a machine parseable CSV

quietly

do not print to console, just return the string representation of the CSV

Note

The monitor_writeCSV function is an alias for this function but defaults to quietly = TRUE.

Examples

library(PWFSLSmoke)

data("Carmel_Valley")

Carmel_Valley <- monitor_subset(Carmel_Valley, tlim = c(20160802,20160803))

monitor_print(Carmel_Valley)
monitor_print(Carmel_Valley, metaOnly = TRUE)
monitor_print(Carmel_Valley, dataOnly = TRUE)

MazamaScience/PWFSLSmoke documentation built on July 3, 2023, 11:03 a.m.