Append new measurement types to the shared registry, safely
Source:R/registry.R
register_measurement_types.RdReplaces the read / bind_rows / write_csv cycle that each ingest used to
hand-roll. Reads and validates the registry, appends only types not already
present, and writes with na = "" so empty cells stay empty. Writes nothing
when there is nothing new to add.
Value
The full updated registry (invisibly if nothing changed), suitable for
dbWriteTable(con, "measurement_type", ...).
Examples
if (FALSE) { # \dontrun{
d_meas_type <- register_measurement_types(
my_new_types, here::here("metadata/measurement_type.csv"))
dbWriteTable(con, "measurement_type", as.data.frame(d_meas_type), overwrite = TRUE)
} # }