add_grid | R Documentation |
Function to add a grid to an LPJmLData
object. The function acts
as a read_io()
wrapper for the grid file and adds it as an
LPJmLData
object itself to the $grid
attribute of the main object.
add_grid(x, ...)
x |
LPJmLData object. |
... |
Arguments passed to |
Important:
If "file_type" == "raw"
prescribe variable = "grid"
to ensure data are
recognized as a grid.
Do not use read_io()
argument subset
here. add_grid
will use the
subset
of the parent LPJmLData
object x
.
A copy of x
(LPJmLData
object) with added $grid
attribute.
## Not run:
# Read in vegetation carbon data with meta file
vegc <- read_io(filename = "./vegc.bin.json")
# Add grid as attribute (via grid file in output directory)
vegc_with_grid <- add_grid(vegc)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.