R/misc-helpers.R

Defines functions clean_g

Documented in clean_g

#' Remove the "g" printed by A&D balance
#'
#' Returns a numeric column after parsing and removing any non-numeric characters
#'
#' @param df
#'
#' @return
#'
clean_g <- function(df){

  df %>%
    dplyr::mutate(
      dplyr::across(
        .cols = dplyr::matches("^tin_(w_wet_sample|w_OD_sample|number)$"),
        .fns = readr::parse_number
      )
    )

}
evanmascitti/soiltestr documentation built on Oct. 6, 2022, 5:32 p.m.