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

View source: R/sk_methods.R

as.vector.skR 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 'sk'
as.vector(x, mode = "any")

Arguments

x

a sk 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 = sk_validate(list(gval=stats::rnorm(4^2), gdim=4, gres=0.5))
as.vector(g)

snapKrig documentation built on May 31, 2023, 6:34 p.m.