Skip to content

Commit

Permalink
Tidy up data doc
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Jul 25, 2016
1 parent 4fb915d commit 8afc3c6
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 48 deletions.
46 changes: 24 additions & 22 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,28 +1,42 @@
#' World Health Organization TB data
#'
#' A subset of data from the World Health Organization Global
#' Tuberculosis Report.
#' A subset of data from the World Health Organization Global Tuberculosis
#' Report, and accompanying global populations.
#'
#' @format A dataset with the variables
#' \describe{
#' \item{country}{}
#' \item{iso2}{Two letter International Organization for Standardization (ISO) country code}
#' \item{iso3}{Three letter International Organization for Standardization (ISO) country code}
#' \item{new_sp_m014 - new_rel_f65}{Counts of new TB cases recorded by group. Column names encode three variables that describe the group (see details).}
#' \item{country}{Country name}
#' \item{iso2,iso2}{2 & 3 letter ISO country codes}
#' \item{new_sp_m014 - new_rel_f65}{Counts of new TB cases recorded by group.
#' Column names encode three variables that describe the group (see details).}
#' }
#'
#' @details The data uses the original codes given by the World Health Organization. The column names for columns five through 60 are made by combining \code{new_} to a code for method of diagnosis (\code{rel} = relapse, \code{sn} = negative pulmonary smear, \code{sp} = positive pulmonary smear, \code{ep} = extrapulmonary) to a code for gender (\code{f} = female, \code{m} = male) to a code for age group (\code{014} = 0-14 yrs of age, \code{1524} = 15-24 years of age, \code{2534} = 25 to 34 years of age, \code{3544} = 35 to 44 years of age, \code{4554} = 45 to 54 years of age, \code{5564} = 55 to 64 years of age, \code{65} = 65 years of age or older).
#' @details The data uses the original codes given by the World Health
#' Organization. The column names for columns five through 60 are made by
#' combining \code{new_} to a code for method of diagnosis (\code{rel} =
#' relapse, \code{sn} = negative pulmonary smear, \code{sp} = positive
#' pulmonary smear, \code{ep} = extrapulmonary) to a code for gender
#' (\code{f} = female, \code{m} = male) to a code for age group (\code{014} =
#' 0-14 yrs of age, \code{1524} = 15-24 years of age, \code{2534} = 25 to
#' 34 years of age, \code{3544} = 35 to 44 years of age, \code{4554} = 45 to
#' 54 years of age, \code{5564} = 55 to 64 years of age, \code{65} = 65 years
#' of age or older).
#'
#' @source \url{http://www.who.int/tb/country/data/download/en/}
#'
"who"

#' @rdname who
"population"

#' Example tabular representations
#'
#' Data sets that demonstrate multiple ways to layout the same tabular data.
#'
#' \code{table1}, \code{table2}, \code{table3}, \code{table4a}, \code{table4b}, and \code{table5} all display the number of TB cases documented by the World Health Organization in Afghanistan, Brazil, and China between 1999 and 2000. The data contains values associated with four variables (country, year, cases, and population), but each table organizes the values in a different layout.
#' \code{table1}, \code{table2}, \code{table3}, \code{table4a}, \code{table4b},
#' and \code{table5} all display the number of TB cases documented by the World
#' Health Organization in Afghanistan, Brazil, and China between 1999 and 2000.
#' The data contains values associated with four variables (country, year,
#' cases, and population), but each table organizes the values in a different
#' layout.
#'
#' The data is a subset of the data contained in the World Health
#' Organization Global Tuberculosis Report
Expand All @@ -45,18 +59,6 @@
#' @rdname table1
"table5"



#' Population data
#'
#' Populations of 219 countries for 1995-2013.
#'
#'
#' @source \url{http://www.who.int/tb/country/data/download/en/}
#'
"population"


#' Some data about the Smith family.
#'
#' A small demo dataset describing John and Mary Smith.
Expand Down
18 changes: 0 additions & 18 deletions man/population.Rd

This file was deleted.

7 changes: 6 additions & 1 deletion man/table1.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 19 additions & 7 deletions man/who.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8afc3c6

Please sign in to comment.