R/colortable.R

Defines functions colortable

Documented in colortable

colortable <- function(x) {
	if (.hasSlot(x, 'legend')) {
		x@legend@colortable
	} else {
		logical(0)
	}
}


'colortable<-' <- function(x, value) {
	# for now assuming values are between 0 and 255!!
	x@legend@colortable <- value
	return(x)
}

Try the raster package in your browser

Any scripts or data that you put into this service are public.

raster documentation built on Jan. 5, 2021, 3:01 a.m.