Skip to content

missing values inconsistent behaviour #48

@srearl

Description

@srearl

Consider the case working with the T&O data where when processing knb-lter-cap.617.4, the secchi disk variable of the field_measurements table capeml did not generate a missing values block for that field - but ONLY for that variable, the missing values block was otherwised generated throughout the dataset including variables in that same field_measurements table. Additionally confusing is that we observed this behaviour with the read_attributes function in isolate but not with the write_missing_values function in isolation --- see example workflow below.

just_attributes <- capeml::read_attributes(entity_name = "field_measurements")

field_measurements |> dplyr::filter(is.na(`Secchi Disk (m)`))

mvf <- tibble::tibble(
  attributeName = as.character(),
  code          = as.character(),
  definition    = as.character()
)

purrr::map_df(
  .x         = colnames(field_measurements),
  .f         = capeml::write_missing_values,
  storage    = mvf,
  dataObject = field_measurements,
  MVC        = "none"
)

capeml::write_missing_values(
  storage = mvf,
  dataObject = field_measurements,
  field = "Secchi Disk (m)",
  MVC = "X"
)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions