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)
}
rspatial/raster documentation built on Oct. 12, 2024, 10:49 a.m.