View source: R/load-write_vdat_csv.r
write_vdat_csv | R Documentation |
Write a vdat_list object to disk in Innovasea Fathom VDAT CSV format
write_vdat_csv(
vdat,
record_types = NULL,
out_file = NULL,
output_format = "csv.fathom",
include_empty = FALSE,
export_settings = NULL
)
vdat |
A |
record_types |
An optional vector of character strings with names of
record types to include in output. E.g., "DET" for detection records.
Default ( |
out_file |
Character string with name of CSV file to be written. If
|
output_format |
Character string with output format. Options are:
|
include_empty |
Logical (default = |
export_settings |
(NOT YET IMPLEMENTED). Placeholder for future specification of other options available via Fathom Data Export app. (E.g., 'Data Types to Include', 'Data Filter', 'Filename Suffix', 'Time Offset in Hours', 'Split CSV by UTC Day'.) |
Writing is done via fwrite
.
A character string with full path and file name to output file.
C. Holbrook (cholbrook@usgs.gov)
## Not run:
# Example 1. Read and write a single file
vrl_file <- system.file("extdata", "detection_files_raw",
"VR2W_109924_20110718_1.vrl",
package = "glatos"
)
temp_dir <- tempdir()
csv_file <- vdat_convert(vrl_file, out_dir = temp_dir)
# utils::browseURL(temp_dir)
# read all record types
vdat <- read_vdat_csv(csv_file)
# write to single file (output_format = "csv.fathom")
temp_file <- tempfile(fileext = ".csv")
write_vdat_csv(vdat, out_file = temp_file)
# write to multiple files (fathom split option)
temp_dir2 <- tempdir()
write_vdat_csv(vdat,
out_file = temp_dir2,
output_format = "csv.fathom.split"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.