Skip to content
Snippets Groups Projects
Commit 39bbd6a6 authored by Jenny Bryan's avatar Jenny Bryan
Browse files

Document country_codes

parent 700b4276
Branches
Tags
No related merge requests found
#' Country codes
#'
#' Data frame of Gapminder country names and ISO 3166-1 country codes:
#' \describe{
#' \item{iso_alpha}{The 3-letter \href{https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3}{ISO 3166-1 alpha-3} code.}
#' \item{iso_num}{The 3-digit \href{https://en.wikipedia.org/wiki/ISO_3166-1_numeric}{ISO 3166-1 numeric-3} code.}
#' }
#' Also includes the countries covered by the supplemental data frame
#' \code{\link{gapminder_unfiltered}}.
#' @examples
#' if (require("dplyr")) {
#' gapminder %>%
#' filter(year == 2007, country %in% c("Kenya", "Peru", "Syria")) %>%
#' select(country, continent) %>%
#' left_join(country_codes)
#' }
"country_codes"
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/country_codes.R
\docType{data}
\name{country_codes}
\alias{country_codes}
\title{Country codes}
\format{An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 187 rows and 3 columns.}
\usage{
country_codes
}
\description{
Data frame of Gapminder country names and ISO 3166-1 country codes:
\describe{
\item{iso_alpha}{The 3-letter \href{https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3}{ISO 3166-1 alpha-3} code.}
\item{iso_num}{The 3-digit \href{https://en.wikipedia.org/wiki/ISO_3166-1_numeric}{ISO 3166-1 numeric-3} code.}
}
Also includes the countries covered by the supplemental data frame
\code{\link{gapminder_unfiltered}}.
}
\examples{
if (require("dplyr")) {
gapminder \%>\%
filter(year == 2007, country \%in\% c("Kenya", "Peru", "Syria")) \%>\%
select(country, continent) \%>\%
left_join(country_codes)
}
}
\keyword{datasets}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment