Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

CIAdata

Return a dataset based on the CIA World Factbook


Description

This function can be used in two different ways. Without an argument, it returns a reference table that includes information about all the CIA World Factbook tables that are available through this function. Note the Name column that indicates a unique name for each available dataset. If this name is passed as an argument to the function, the function will return the corresponding dataset.

Usage

CIAdata(name = NULL)

Arguments

name

An optional parameter specifying the name of the desired dataset. If multiple names are given, a merge will be attempted on the individual data sets.

Examples

## Not run: 
head(CIAdata())
Population <- CIAdata("pop")
nrow(Population)
head(Population)

PopArea <- 
  CIAdata(c("pop","area")) %>% 
  mutate(density = pop / area)
nrow(PopArea)
head(PopArea)
PopArea %>% 
  filter(!is.na(density)) %>%
  arrange(density) %>% 
  tail()

## End(Not run)

mosaic

Project MOSAIC Statistics and Mathematics Teaching Utilities

v1.8.3
GPL (>= 2)
Authors
Randall Pruim [aut, cre], Daniel T. Kaplan [aut], Nicholas J. Horton [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.