| gdal_can_open | R Documentation |
A lightweight diagnostic that tries to open the specified path via GDAL
and returns TRUE if successful, FALSE if GDAL cannot open
it. Stops with an informative error if the package was built without
GDAL support.
gdal_can_open(path)
path |
Character string: path to the raster file. |
Logical TRUE if GDAL can open the file, FALSE
otherwise.
if (has_gdal()) {
gdal_can_open(system.file("extdata", "tiny.tif", package = "xbioclim"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.