write_field_json: Write Field Data in JSON format

View source: R/write_field_json.R

write_field_jsonR Documentation

Write Field Data in JSON format

Description

Write field visit monitoring event data to JSON format.

Usage

write_field_json(x, path, overwrite = FALSE)

Arguments

x

'list' with compoents of class 'mlms.sheet'. See returned object from the read_field_xlsx function.

path

'character' string. Path to the JSON file.

overwrite

'logical' flag. Whether to overwrite the JSON file.

Value

Worksheet data as a 'list' with compoents of class 'mlms.sheet'.

Author(s)

J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center

See Also

read_field_json function for reading field data in JSON format.

Examples

sheets <- read_field_xlsx(
  path = system.file("/extdata/ex-field.xlsx", package = "mlms")
)

path <- tempfile("sheets-", fileext = ".json")
write_field_json(sheets, path = path)
if (interactive()) file.show(path)

unlink(path)

mlms documentation built on April 4, 2025, 4:43 a.m.