I've downloaded the USDA Crop Data Layer (data available here, note large file: http://www.nass.usda.gov/research/Cropland/SARS1a.htm) and want to import it into R for analysis. I've imported other large GTIFF files (e.g., LANDSAT data), but get the following error when I call the function:
r <- raster(file)
Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
Cannot create a RasterLayer object from this file.
where "file" is any of the .tif files provided by USDA (I'm using the Midwest regional compilation).
I suspect the problem is that the GTiff is categorical data (land use categories) rather than true ordinal / spectral data, but I don't understand why it would render fine in an image editor (e.g., Preview) and balk in R / GDAL.
Thanks for the help.
Edit: if this should go on the GIS forum, please let me know. Generally, it seems that programming approaches to spatial problems reside here, no?