Description Usage Arguments Details Value Examples
Converts a raster of factor values to the a raster of the corresponding numeric values. Somewhat more efficient than get_depth_from_lutable, but can still take a long time for big rasters. See raster::factor documentation.
1 | as_numeric_raster(r, att)
|
r |
a raster with an attribute table |
att |
column of the attribute to extract |
Given a raster with data values coded in an attribute table, creates a raster directly composed of those values. Loops over every entry in the raster; it is not very efficient.
r2 raster of numeric values coded from the input raster
1 2 3 | umesc <- raster("/Users/jschap/Box Sync/Margulis_Research_Group/Jacob/UMBB/Data/UMESC/bath_pool_21/bath_1999_p21")
umesc <- raster("bath_pool_21/bath_1999_p21")
depth <- as_numeric_raster(umesc, att = "DEPTH_M")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.