Learn R Programming

ursa (version 3.11.1)

as_stars: Raster coercion to `stars`

Description

Coercion from raster ursaRaster object to raster stars object defined in package stars.

Usage

as_stars(obj)

Value

Object of class stars for argument of class ursaRaster. Otherwise, NULL.

Arguments

obj

Object of class ursaRaster.

Author

Nikita Platonov platonov@sevin.ru

Details

Simple coercion to stars object of package stars. Currently, color tables and attribution tables are not supported.

Examples

Run this code
session_grid(NULL)
a <- ursa_dummy(3)
x <- as_stars(a)
class(x)
if (requireNamespace("stars")) {
   print(x)
   b <- as_ursa(x)
   print(a)
   print(b)
}

Run the code above in your browser using DataLab