Learn R Programming

mosaic (version 0.9.2-2)

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

Examples

Run this code
head(CIAdata())
gdpData <- CIAdata("pop")
nrow(gdpData)

mergedData <- merge(CIAdata("pop"), CIAdata("fert"), by="country")
head(mergedData)

Run the code above in your browser using DataLab