| readINCABIL | R Documentation | 
Read an INCA file in the BIL format from a .tar.gz archive.
readINCABIL(
  filename,
  times = "first",
  date = NULL,
  remove = FALSE,
  CoSys = NULL,
  ex = NULL,
  tz = "utc",
  form = "stack"
)
filename | 
 A character string to the file to be read in  | 
times | 
 A character string giving the element of the BIL file to be read in. One of 'first', 'last', 'all', 'date'. See details.  | 
date | 
 A POSIXct date or NULL. Only evaluated if times == date  | 
remove | 
 Logical. Remove the processed files?  | 
CoSys | 
 A character string giving the coordinate system of the raster or NULL.  | 
ex | 
 Either an extent, a numerical vector that can be coerced to an extent object or NULL.  | 
tz | 
 A character string giving the time zone  | 
form | 
 A character string. May be either 'list' or 'stack'  | 
Both uncompressed and compressed (.tar.gz) files can be processed. If uncompressed, only the filename without extension must be provided.#'
A named (date and time) list with rasters if form == 'list', or, if form == 'stack' a raster stack
Simon Frey
raster readBin proj4string crs writeINCABIL extent
   # file to load
   file <- paste(path.package("ZAMGR"),"/extdata/INCA_TT.tar.gz",sep="")
   # reading a compressed file
   x <- readINCABIL(file)
   # plot the results
   plot(x[[1]])
   # compress first and then read
   file <- untar(file, exdir = tempdir())
   file <- dir(path = tempdir(), pattern = ".bil", full.names = TRUE)
   x <- readINCABIL(file = gsub(".bil", replacement = "", file), times = "all")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.