I am trying to follow the example give here under "A polar example"
This example uses sea-ice data in .bin format to plot as raster. I am trying the same with a different file available from the original ftp server of the National Snow and Ice Data Center. Hence, I assume there should be no issue. However, when I try to prompt R run the following script
# from NSIDC sea ice concentration file
baseurl <- "ftp://sidads.colorado.edu/pub/DATASETS/"
f2 <- paste(baseurl,
"nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2013/nt_20130111_f17_v1.1_n.bin",
sep='')
if (!file.exists(basename(f2))) download.file(f2, basename(f2), mode = "wb")
ice2 <- raster(basename(f2))
Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", : Cannot create a RasterLayer object from this file.
Where am I going wrong? is the .bin file corrupted? Any help appreciated!
Thanks!