bk_validate | R Documentation |
Check compatibility of entries in a bk grid object, and fill in any missing ones
bk_validate(g)
g |
a "bk" object or a list accepted by |
This constructs the object and fills missing entries. It then does some sanity checks
and computes the number of missing grid points (in list entry n_missing
).
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
.
a validated "bk" object
# auto-print reminds users to validate
bk_validate(list(gdim=10, gres=0.5))
bk_validate(list(gval=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.