# First, make sure your personal PVS API key is saved as character string in the pvs.key variable:
pvs.key <- "yourkey"
# get a data frame of bills according to all year and state combinations
bills <- Votes.getBillsByYearState(year=list(2011,2012),
stateId=list("NY","NJ"), all=TRUE)
bills
# get a data frame of bills according to the exact year and state combinations
# (i.e., 2011/"NY", 2012/"NJ")
bills <- Votes.getBillsByYearState(year=list(2011,2012),
stateId=list("NY","NJ"), all=FALSE)
bills
Run the code above in your browser using DataLab