Skip to content

Commit

Permalink
added countries data
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed May 6, 2020
1 parent 877fcc4 commit 1ca1deb
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
13 changes: 13 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,16 @@
#' }
#' @source The world
"cities"

#' World's countries.
#'
#' Dataset with hierarchical levels for countries : continent and subregion.
#'
#' @format A data frame with 177 rows and 3 variables:
#' \describe{
#' \item{continent}{Continent}
#' \item{subregion}{Sub region}
#' \item{name}{Country name}
#' }
#' @source Data from package \href{https://github.com/ropensci/rnaturalearth}{rnaturalearth}
"countries"
8 changes: 8 additions & 0 deletions data-raw/countries.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## code to prepare `countries` dataset goes here

library(rnaturalearth)

countries <- rnaturalearth::countries110@data[, c("continent", "subregion", "name")]


usethis::use_data(countries, overwrite = TRUE)
Binary file added data/countries.rda
Binary file not shown.
24 changes: 24 additions & 0 deletions man/countries.Rd

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

0 comments on commit 1ca1deb

Please sign in to comment.