Learn R Programming

ursa (version 3.10.4)

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, ...)

Value

Object of class table.

Arguments

x

ursaRaster object.

...

Other arguments which passed to function table of package base.

Author

Nikita Platonov platonov@sevin.ru

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
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