R/years.R

Defines functions years

Documented in years

#' Get years function
#'
#' This function will print the years available for a variable(s)
#'     in the Correlates of State Policy Project data.
#'
#' @param variables variable names from cspp, as strings
#' @export
#'

years = function(variables){
  descriptions = c()
  for(var in variables){
    description = cspp:::variable_info$years[cspp:::variable_info$variablename==var]
    descriptions = c(descriptions, description)
  }
  return(descriptions)
}
shaylafolson/cspp documentation built on Aug. 17, 2020, 12:31 a.m.