#' Extract the number of units from a data frame with the same columns as tidy_incidents data.
#'
#' @param df data frame from which we want to extract the number of units
#'
#' @return data frame with a column named `col` containing all the number of units.
#' @import dplyr
#' @export
#' @rdname get_nb_units
#'
get_nb_units <- function(df){
#get number of units
nb_units <- df %>%
select(units) %>%
rename(col = units)
return(nb_units)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.