Learn R Programming

pvsR (version 0.1.1)

Office.getTypes: Get all office types tracked

Description

This function is a wrapper for the Office.getTypes() method of the PVS API Office class which grabs a list of office types Project Vote Smart keeps track of.

Usage

Office.getTypes()

Arguments

Value

  • A data frame with rows for each office type and columns with variables describing the office type. The returned data frame contains a row for each office type and columns with the following variables describing the office type: officeTypes.type*.officeTypeId, officeTypes.type*.officeLevelId, officeTypes.type*.officeBranchId, officeTypes.type*.name.

References

http://api.votesmart.org/docs/Office.html

Examples

Run this code
# First, make sure your personal PVS API key is saved as character string in the pvs.key variable:
pvs.key <- "yourkey"
# get all office types tracked
officetypes <- Office.getTypes()
officetypes

Run the code above in your browser using DataLab