This function is a wrapper for the Rating.getRating() method of the PVS API Rating class which dumps all candidate ratings from a scorecard by a special interest group (SIG). The function sends a request with this method to the PVS API for all rating IDs given as a function input, extracts the XML values from the returned XML file(s) and returns them arranged in one data frame.
a character string or list of character strings with the rating ID(s) (see references for details)
A data frame with a row for each candidate and columns with the following variables describing the candidate:
Ulrich Matter <ulrich.matter-at-unibas.ch>
Use Rating.getSigRatings() or Rating.getCandidateRating() to get a list of rating IDs.
1 2 3 4 5 6
# First, make sure your personal PVS API key is saved as an option # (options("pvs.key" = "yourkey")) or in the pvs.key variable: ## Not run: pvs.key <- "yourkey" # get the candidate rating by a certain special interest group ## Not run: scorecard <- Rating.getRating(77) ## Not run: scorecard
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.