Description Usage Arguments Details Value See Also Examples
Generate a feature by planning unit (aka rij matrix) using spatial
data sets. The rij
contains data on the amount of each feature in
each planning unit.
1 2 3 | rij_matrix(x, y, ...) # x=Raster, y=Raster
rij_matrix(x, y, ...) # x=Spatial, y=Raster
|
x |
|
y |
|
... |
additional arguments passed to |
The sparse matrix represents the spatial intersection between the planning units and the features. Rows correspond to planning units, and columns correspond to features. Values correspond to the amount of the feature in the planning unit. For example, the amount of the third species in the second planning unit would be contained in the cell in the third column and in the second column.
This function can take a long to run for big data sets. To reduce
processing time, the set_number_of_threads
function
can be used to allocate more computational resources. Additionally,
dealing with planning units represented with
SpatialPolygonsDataFrame
object, the
velox
package can be installed to reduce
processing time.
Generally, processing Spatial-class
data takes much
longer to process then Raster-class
data, and
so it is recomended to use Raster-class
data
for planning units where possible.
Matrix{dgCMatrix-class}
object.
1 2 3 4 5 6 7 8 | # load data
data(sim_pu_raster, sim_pu_polygons)
# create rij matrix using raster planning units
rij_raster <- rij_matrix(sim_pu_raster, sim_features)
# create rij matrix using polygon planning units
rij_polygons <- rij_matrix(sim_pu_polygons, sim_features)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.