as_vector {quadtree} | R Documentation |
Get all Quadtree
cell values as a vector
Description
Returns all cell values of a Quadtree
as a
numeric vector.
Usage
## S4 method for signature 'Quadtree'
as_vector(x, terminal_only = TRUE)
Arguments
x |
a |
terminal_only |
boolean; if |
Value
a numeric vector
See Also
as_data_frame
creates a data frame from a
Quadtree
that has all the cell values as well as details
about each cell's size and extent.
Examples
library(quadtree)
habitat <- terra::rast(system.file("extdata", "habitat.tif", package="quadtree"))
qt <- quadtree(habitat, .2)
head(as_vector(qt), 20)
head(as_vector(qt, FALSE), 20)
[Package quadtree version 0.1.14 Index]