#' @title Clean HIV CD4 and VL data
#'
#' Convert HIV VL binary variable a factor
#' @param x data frame from server with HIV VL and CD4 data
#'
clean_cd4_vl <- function(x) {
# Check args ----
assertthat::assert_that(is.data.frame(x))
# Convert status change to factor ----
x$hiv_vl_detect <-
factor(x$hiv_vl_detect,
levels = c("Detectable", "Undetectable"))
x
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.