Learn R Programming

snapKrig (version 0.0.2)

sk_make: Make a sk grid object

Description

This constructs a "sk" object from a named list containing at least the element gdim or gyx. Users can optionally provide other list elements gres, gval, crs, is_obs, and idx_grid.

Usage

sk_make(g)

Value

a "sk" object

Arguments

g

list with any of the seven named arguments mentioned above (gdim, etc)

Details

Input classes and lengths are checked before returning. gdim and gres are length-2 vectors (with y and x elements) but they can each be specified by a single number, as shorthand to use the same value for y and x. gval should be a matrix or vector of grid data, and crs should be a character string (the WKT representation).

Examples

Run this code

# auto-print reminds users to validate
sk_make(list(gdim=10, gres=0.5))

Run the code above in your browser using DataLab