View source: R/raster_array_conversions.R
array_to_RasterStack | R Documentation |
Convert from an image array to a raster stack, optionally using the alpha channel as a mask.
array_to_RasterStack(
img_array,
type = c("stack", "brick"),
alpha_mask = TRUE,
return_alpha = FALSE
)
img_array |
An RGB array. |
type |
Type of Raster* object to return. One of either "stack" (raster::stack) or "brick" (raster::brick). |
alpha_mask |
Logical. Use the alpha channel as a background mask? |
return_alpha |
Logical. Return the alpha channel as a layer? |
A Raster* object, either RasterStack
or RasterBrick
depending
on the type
argument.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.