if (FALSE) {
# download multiple years of Iowa Data
# for raster
r <- getCDL('iowa',c(2006,2010))
# resample based on the 2006
r2 <- createComparableCDL(r,baseIndex=1)
# for terra (note it will just reload what was already downloaded)
r_terra <- getCDL('iowa',c(2006,2010), returnType = 'terra')
# resample based on the 2006
r_terra2 <- createComparableCDL(r_terra,baseIndex=1)
}
Run the code above in your browser using DataLab