R/n_countries.R

Defines functions n_countries

Documented in n_countries

#' count the number of countried in dataset
#' @title n_countries
#' @return sum of country during this epdemic
#' @param data a dataset containing a `country` column
#' @description it help people count the country
#' @examples
#' n_countries(coronavirus)
#'
#' @return sum of country during this epdemic 
#' @export
n_countries<-function(data){
  dplyr::n_distinct(data$location)
}
etc5523-2020/r-package-assessment-cgon0007 documentation built on Jan. 1, 2021, 1:12 a.m.