Learn R Programming

cdlTools (version 0.15)

getCDL: Get CDL raster data

Description

getCDL retrieves CDL state raster objects for a set of years.

Usage

getCDL(x, year, alternativeUrl, location, https = TRUE,
  ssl.verifypeer = TRUE)

Value

A list of CDL raster objects of interested county for a set of years.

Arguments

x

Is either a two digit state FIPS code, a two letter abbreviation, or a state name.

year

A numerical vector. A set of years of CDL data to download.

alternativeUrl

An optional string containing an alternative url.

location

An optional string containing a location to store the file.

https

An optional boolean to turn on and off https, default is on.

ssl.verifypeer

An optional boolean to turn on and off ssl verfication, default is on.

Author

Jonathan Lisic, jlisic@gmail.com

Joseph Stachelek, stachel2@msu.edu

Examples

Run this code
if (FALSE) {
# Get data for California, 2013 and 2015
# by FIPS
getCDL(6,c(2013,2015))
# Get data for California, 2013 and 2015
getCDL("California",c(2013,2015))
# Get all the west coast from 2009 to 2016
getCDL(c("CA","OR","WA"),2013:2016)
}

Run the code above in your browser using DataLab