Density plot
Create density plots of the cell values of a SpatRaster methods
## S4 method for signature 'SpatRaster' density(x, maxcells=100000, plot=TRUE, main, ...)
x
: SpatRastermaxcells
: the maximum number of (randomly sampled) cells to be used for creating the plotplot
: if TRUE
produce a plot, else return a density objectmain
: character. Caption of plot(s)...
: additional arguments passed to plot
density plot (and a density object, returned invisibly if plot=TRUE)
logo <- rast(system.file("ex/logo.tif", package="terra")) density(logo)
Useful links
Downloads (last 30 days):