Learn R Programming

manifestoR (version 1.0-4)

mp_maindataset: Access the Manifesto Project's Main Dataset

Description

Gets the Manifesto Project's Main Dataset from the project's web API or the local cache, if it was already downloaded before.

Usage

mp_maindataset(version = "current", apikey = NULL, cache = TRUE)

Arguments

version
Specify the version of the dataset you want to access. Use "current" to obtain the most recent, or use mp_coreversions for a list of available versions.
apikey
API key to use. Defaults to NULL, resulting in using the API key set via mp_setapikey.
cache
Boolean flag indicating whether to use locally cached data if available.

Value

  • The Manifesto Project Main Dataset with classes data.frame and tbl_df

Examples

Run this code
mpds <- mp_maindataset()
head(mpds)
median(subset(mpds, countryname == "Switzerland")$rile, na.rm = TRUE)

Run the code above in your browser using DataLab