Extract specific metadata items from the MX801 details sheet
Source:R/parse_mx801_details.R
parse_mx801_details.Rd
This it a internal helper function to extract MX801 details (metadata) from the third sheet of an Excel file.
Details
parse_mx801_details()
is kludgy because the data
is written into the details file in a fairly haphazard way.
The approach is to do a bunch of formatting of the text from the details file to make it somewhat YAML like, to parse as YAML, and then to do a little more cleanup and extraction.
Examples
# parse_mx801_details() is an internal function so example code will
# only work after devtools::load_all()
if (FALSE) { # \dontrun{
p <- setup_example_dir(site_filter = "BBC", year_filter = 2025,
deployment_filter = "2025-01-04")
f <- list.files(file.path(p$deployment, "Calibrated"),
pattern = ".xlsx$", full.names = TRUE )
md <- parse_mx801_details(f)
yaml::as.yaml(md) |> cat(sep = "\n")
} # }