sk_validate | R Documentation |
This constructs the object and fills missing entries. It then does some sanity checks
and computes the index of NA points (in list entry is_obs
).
sk_validate(g, res_tol = 1e-06)
g |
a "sk" object or a list accepted by |
res_tol |
positive numeric, tolerance validating resolution (see details) |
The function removes/introduces idx_grid
depending on whether gval
is a vector
(single-layer case) or a matrix (usually a multi-layer case). If idx_grid
is missing
and gval
is a matrix, it is assumed to contain all grid-points (including NAs)
The function also assigns dimension names in the order 'y', 'x' (unless otherwise
specified) for gdim
, gres
, and gyx
.
res_tol
is used to check if the resolution gres
is consistent with the spacing
of the grid lines. Only the spacing of the first two lines is computed - if the
relative error along either dimensions is greater res_tol
, the function throws
an error.
a validated "sk" object
sk_validate(list(gdim=10, gres=0.5))
sk_validate(list(gval=stats::rnorm(10^2), gdim=10, gres=0.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.