Learn R Programming

ropensecretsapi (version 1.0.0)

GetCandIndByIndData: Provides total contributed to specified candidate from specified industry for specified cycle.

Description

Provides total contributed to specified candidate from specified industry for specified cycle.

Usage

GetCandIndByIndData(params)

Arguments

params
Any parameter accepted by this web service call -- see https://www.opensecrets.org/api/?output=doc&method=candIndByInd{here}.

Examples

Run this code
SetAPIKey ("ENTER YOUR PRIVATE API KEY HERE.")
 params <- list (cid="N00007360", cycle="2012", ind="K02")
 tryCatch(
     candIndByIndData <- GetCandIndByIndData (params),
     error =
         function (e) {
             print (
                 paste (
                     "An exception was thrown -- details follow: ",
                     e,
                     sep=""
                 )
             )
         }
     )

Run the code above in your browser using DataLab