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.

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)
#> ##### Site metadata begins below here,, #> parameter,blank,060530002_01 #> monitorID,,060530002_01 #> longitude,,-121.7319 #> latitude,,36.4833 #> elevation,,200.1 #> timezone,,America/Los_Angeles #> countryCode,,US #> stateCode,,CA #> siteName,,Carmel Valley AMS #> agencyName,,Monterey Bay Unified APCD #> countyName,,MONTEREY #> msaName,,"Salinas, CA" #> monitorType,,NA #> siteID,,060530002 #> instrumentID,,01 #> aqsID,,060530002 #> pwfslID,,NA #> pwfslDataIngestSource,,NA #> telemetryAggregator,,NA #> telemetryUnitID,,NA #> ,, #> ##### Hourly data begins below here,, #> UTC Time,Local Time,060530002_01 #> 2016-08-02 00:00:00 UTC,2016-08-01 17:00:00 PDT,3 #> 2016-08-02 01:00:00 UTC,2016-08-01 18:00:00 PDT,6 #> 2016-08-02 02:00:00 UTC,2016-08-01 19:00:00 PDT,19 #> 2016-08-02 03:00:00 UTC,2016-08-01 20:00:00 PDT,29 #> 2016-08-02 04:00:00 UTC,2016-08-01 21:00:00 PDT,27 #> 2016-08-02 05:00:00 UTC,2016-08-01 22:00:00 PDT,38 #> 2016-08-02 06:00:00 UTC,2016-08-01 23:00:00 PDT,28 #> 2016-08-02 07:00:00 UTC,2016-08-02 00:00:00 PDT,26 #> 2016-08-02 08:00:00 UTC,2016-08-02 01:00:00 PDT,31 #> 2016-08-02 09:00:00 UTC,2016-08-02 02:00:00 PDT,38 #> 2016-08-02 10:00:00 UTC,2016-08-02 03:00:00 PDT,47 #> 2016-08-02 11:00:00 UTC,2016-08-02 04:00:00 PDT,76 #> 2016-08-02 12:00:00 UTC,2016-08-02 05:00:00 PDT,99 #> 2016-08-02 13:00:00 UTC,2016-08-02 06:00:00 PDT,126 #> 2016-08-02 14:00:00 UTC,2016-08-02 07:00:00 PDT,142 #> 2016-08-02 15:00:00 UTC,2016-08-02 08:00:00 PDT,156 #> 2016-08-02 16:00:00 UTC,2016-08-02 09:00:00 PDT,129 #> 2016-08-02 17:00:00 UTC,2016-08-02 10:00:00 PDT,NA #> 2016-08-02 18:00:00 UTC,2016-08-02 11:00:00 PDT,100 #> 2016-08-02 19:00:00 UTC,2016-08-02 12:00:00 PDT,90 #> 2016-08-02 20:00:00 UTC,2016-08-02 13:00:00 PDT,33 #> 2016-08-02 21:00:00 UTC,2016-08-02 14:00:00 PDT,16 #> 2016-08-02 22:00:00 UTC,2016-08-02 15:00:00 PDT,8 #> 2016-08-02 23:00:00 UTC,2016-08-02 16:00:00 PDT,9 #> 2016-08-03 00:00:00 UTC,2016-08-02 17:00:00 PDT,9
monitor_print(Carmel_Valley, metaOnly = TRUE)
#> monitorID,longitude,latitude,elevation,timezone,countryCode,stateCode,siteName,agencyName,countyName,msaName,monitorType,siteID,instrumentID,aqsID,pwfslID,pwfslDataIngestSource,telemetryAggregator,telemetryUnitID #> 060530002_01,-121.731903,36.483299,200.1,America/Los_Angeles,US,CA,Carmel Valley AMS,Monterey Bay Unified APCD,MONTEREY,"Salinas, CA",NA,060530002,01,060530002,NA,NA,NA,NA
monitor_print(Carmel_Valley, dataOnly = TRUE)
#> UTC Time,Local Time,060530002_01 #> 2016-08-02 00:00:00 UTC,2016-08-01 17:00:00 PDT,3 #> 2016-08-02 01:00:00 UTC,2016-08-01 18:00:00 PDT,6 #> 2016-08-02 02:00:00 UTC,2016-08-01 19:00:00 PDT,19 #> 2016-08-02 03:00:00 UTC,2016-08-01 20:00:00 PDT,29 #> 2016-08-02 04:00:00 UTC,2016-08-01 21:00:00 PDT,27 #> 2016-08-02 05:00:00 UTC,2016-08-01 22:00:00 PDT,38 #> 2016-08-02 06:00:00 UTC,2016-08-01 23:00:00 PDT,28 #> 2016-08-02 07:00:00 UTC,2016-08-02 00:00:00 PDT,26 #> 2016-08-02 08:00:00 UTC,2016-08-02 01:00:00 PDT,31 #> 2016-08-02 09:00:00 UTC,2016-08-02 02:00:00 PDT,38 #> 2016-08-02 10:00:00 UTC,2016-08-02 03:00:00 PDT,47 #> 2016-08-02 11:00:00 UTC,2016-08-02 04:00:00 PDT,76 #> 2016-08-02 12:00:00 UTC,2016-08-02 05:00:00 PDT,99 #> 2016-08-02 13:00:00 UTC,2016-08-02 06:00:00 PDT,126 #> 2016-08-02 14:00:00 UTC,2016-08-02 07:00:00 PDT,142 #> 2016-08-02 15:00:00 UTC,2016-08-02 08:00:00 PDT,156 #> 2016-08-02 16:00:00 UTC,2016-08-02 09:00:00 PDT,129 #> 2016-08-02 17:00:00 UTC,2016-08-02 10:00:00 PDT,NA #> 2016-08-02 18:00:00 UTC,2016-08-02 11:00:00 PDT,100 #> 2016-08-02 19:00:00 UTC,2016-08-02 12:00:00 PDT,90 #> 2016-08-02 20:00:00 UTC,2016-08-02 13:00:00 PDT,33 #> 2016-08-02 21:00:00 UTC,2016-08-02 14:00:00 PDT,16 #> 2016-08-02 22:00:00 UTC,2016-08-02 15:00:00 PDT,8 #> 2016-08-02 23:00:00 UTC,2016-08-02 16:00:00 PDT,9 #> 2016-08-03 00:00:00 UTC,2016-08-02 17:00:00 PDT,9