monitor_writeCSV: Write monitor data as CSV

Description Usage Arguments Note Examples

View source: R/monitor_writeCSV.R

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 returned invisibly but not saved to a file unless saveFile is specified.

Usage

1
2
3
4
5
6
7
monitor_writeCSV(
  ws_monitor,
  saveFile = NULL,
  metaOnly = FALSE,
  dataOnly = FALSE,
  quietly = TRUE
)

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

This function wraps the monitor_print function but defaults to quietly = FALSE.

Examples

1
2
3
4
5
6
7
8
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)

PWFSLSmoke documentation built on Nov. 23, 2021, 5:06 p.m.