Learn R Programming

snapKrig (version 0.0.2)

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

Value

a vector of the specified mode

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

Examples

Run this code
g = sk_validate(list(gval=stats::rnorm(4^2), gdim=4, gres=0.5))
as.vector(g)

Run the code above in your browser using DataLab