Learn R Programming

ursa (version 3.9.4)

discolor: Destroy color table for raster images.

Description

If raster's categories are integer or numeric, then raster values are restored from names of categories. Otherwise only category names are dropped.

Usage

discolor(obj, nodata = NA)

Arguments

obj

Object of class ursaRaster

nodata

Numeric. Flag value for "no-data". If NA, then no-data values are missed. Default is NA.

Value

Object of class ursaRaster without color table.

Examples

Run this code
# NOT RUN {
session_grid(NULL)
a <- colorize(pixelsize(),ncolor=7)
print(ursa_colortable(a))
print(a)
b <- discolor(a)
print(ursa_colortable(b))
print(b)
# }

Run the code above in your browser using DataLab