Skip to content

Commit

Permalink
Merge pull request #355 from RobFryer/bug_354
Browse files Browse the repository at this point in the history
Bug 354 determinand always in upper case
  • Loading branch information
morungos authored Nov 2, 2023
2 parents 969a0e0 + d6e17de commit d09f190
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions R/import_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,17 @@ read_contaminants <- function(file, data_dir = ".", info) {
} else {
data$subseries <- NA_character_
}


# convert param (determinand) and munit (unit) to upper / lower case

data <- dplyr::mutate(
data,
param = toupper(.data$param),
munit = tolower(.data$munit)
)


return(data)
}

Expand Down
6 changes: 6 additions & 0 deletions R/information_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,12 @@ ctsm_read_determinand <- function(
)



# ensure determinand is in upper case

data$determinand <- toupper(data$determinand)


# fill in common name if missing and create optional variables if missing

data$common_name <- ifelse(
Expand Down

0 comments on commit d09f190

Please sign in to comment.