ursa (version 3.8.8)

as.table: Frequency of unique values

Description

as.table is an implementation of function base::table for values of raster image.

Usage

# S3 method for ursaRaster
as.table(x, ...)

ursa_table(x, ...)

Arguments

x

ursaRaster object.

Other arguments which passed to function table of package base.

Value

Object of class table.

Details

If ursaRaster has a colortable, then values are replaced by names of categories.

ursa_table is synonym to method as.table for class `ursaRaster`.

Examples

Run this code
# NOT RUN {
session_grid(NULL)
a <- colorize(pixelsize(),nbreak=4)
t1 <- as.table(a)
print(t1)
str(t1)
ursa_colortable(a) <- NULL
t2 <- as.table(a)
print(t2)
# }

Run the code above in your browser using DataLab