Description Usage Arguments Details Value
View source: R/spatial_nutrient.R
Spatialization is performed bny fitting a variogram model to the nutrients fertilization plans and then performing ordinary kriging.
1 2 3 4 5 6 7 8 9 | spatial_nutrient(
sp_df,
model = "auto",
grid_spdf = NULL,
bbox_buffer = 0L,
spat_res = 5L,
nutrient = "all",
...
)
|
sp_df |
a Spatial soil nutrients fertilization dataset |
model |
a character vector describing the variogram model type.
Either "auto" or one of the available variogram models to |
grid_spdf |
a |
bbox_buffer |
an integer value to enlarge (or shrink) the bounding box the
default point grid is built in (i.e. when grid_spdf is set to |
spat_res |
a positive number indicating the spatial resolution
of the resulting spatial grid when |
nutrient |
a character vector detailing which nutrient spatialized fertilization plan to compute among "nitrogen", "phosphorus", and "potassium". Any combination of the three nutrients can be given or "all" (default) to compute all of them. |
... |
arguments that will be passed to |
The function returns a list of sp::SpatialPointsDataFrame()
grids on the
bounding box of the spatial soil nutrients fertilization dataset, as
returned by demand_nutrient()
. Each spatial grid can be readily plotted or
rasterized.
Spatial coordinates must be passed as 'X' and 'Y' named columns in sp_df
spatial table. This table should also containing either 'nitrogen',
'phosphorus', and 'potassium' named columns according to the nutrient plan
to be spatialized passed as nutrient
argument.
a list with as many elements as nutrients given as nutrient
parameter. Each element is a sp::SpatialPointsDataFrame()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.