| setLansdcape | R Documentation |
Updates a LandsepiParams object with a sp or sf object as landscape.
setLandscape(params, land)
params |
a LandsepiParams Object. |
land |
a landscape as sp or sf object |
The landscape should be a sp or sf object. Built-in landscape are available using
loadLandscape.
See our tutorial (vignettes) for details on how to use your own landscape.
If the landscape contains only polygons, croptypes can be allocated later using
allocateLandscapeCroptypes.
Otherwise the landscape has to contain a data.frame specifying for every year, the index
of the croptype cultivated in each polygon.
Each features has a field identified by "year_XX" (XX <- seq(1:Nyears+1)) and containing
the croptype ID.
| Features/fields | year_1 | year_2 | ... year_Nyears+1 |
| polygons1 | 13 | 10 | 13 |
| polygonsX | 2 | 1 | 2 |
a LandsepiParams object.
loadLandscape
## Not run:
simul_params <- createSimulParams()
simul_params <- setLandscape(simul_params, loadLandscape(1))
simul_params@Landscape
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.