Learn R Programming

rdwplus (version 0.1.0)

plot_layer: A function to plot a raster from a file name

Description

Given a path to a file raster, this function will plot it as a RasterLayer object.

Usage

plot_layer(x, ...)

Value

Nothing.

Arguments

x

A file path to a raster stored on disk. Can also be a Raster* object.

...

Additional arguments to plot.

Examples

Run this code
# \donttest{
# Load data set file path
dem <- system.file("extdata", "dem.tif", package = "rdwplus")
# Plot
# MAY NEED TO HAVE rgdal INSTALLED FOR .TIF FILES
plot_layer(dem)
# }

Run the code above in your browser using DataLab