as.vector.bk: Convert grid data to vector of specified mode

View source: R/bk.R

as.vector.bkR Documentation

Convert grid data to vector of specified mode

Description

Returns a vector of the specified mode, representing the vectorized grid data. For multi-layer x, the first layer is returned.

Usage

## S3 method for class 'bk'
as.vector(x, mode = "any")

Arguments

x

a bk object

mode

passed to as.vector

Details

For single layer x, and with default mode='any', this is the same as x[]

Value

a vector of the specified mode

Examples

g = bk_validate(list(gval=rnorm(4^2), gdim=4, gres=0.5))
as.vector(g)

deankoch/pkern documentation built on Oct. 26, 2023, 8:54 p.m.