R/getATCViaNHINo.R

Defines functions getATCViaNHINo

Documented in getATCViaNHINo

#' @rdname getATCViaNHINo
#' @export

getATCViaNHINo <- function(df, NHINoColName = NHINo){

  colnames(df)[colnames(df)==deparse(substitute(NHINoColName))] <- "NHINo"

  ATCData <- df %>%
    left_join(resATC,by = c("NHINo" = "nhino"))

  colnames(ATCData)[colnames(ATCData)== "NHINo"] <- deparse(substitute(NHINoColName))
  return(ATCData)
}
DHLab-CGU/pharm documentation built on July 2, 2022, 7:16 a.m.