Feature by planning unit matrix
Generate a matrix showing the amount of each feature in each planning unit (also known as an rij matrix).
rij_matrix(x, y, ...) ## S4 method for signature 'Raster,Raster' rij_matrix(x, y, ...) ## S4 method for signature 'Spatial,Raster' rij_matrix(x, y, fun, ...) ## S4 method for signature 'sf,Raster' rij_matrix(x, y, fun, ...)
dgCMatrix
sparse matrix object.
The sparse matrix represents the spatial intersection between the
planning units and the features. Rows correspond to features,
and columns correspond to planning units. Values correspond to the amount
(or presence/absence) of the feature in the planning unit. For example,
the amount of the third species in the second planning unit would be
stored in the third column and second row.
# load data data(sim_pu_raster, sim_pu_polygons, sim_pu_sf, sim_pu_zones_stack) # create rij matrix using raster layer planning units rij_raster <- rij_matrix(sim_pu_raster, sim_features) print(rij_raster) # create rij matrix using polygon (Spatial) planning units rij_polygons <- rij_matrix(sim_pu_polygons, sim_features) print(rij_polygons) # create rij matrix using polygon (sf) planning units rij_sf <- rij_matrix(sim_pu_sf, sim_features) print(rij_sf) # create rij matrix using raster stack planning units rij_zones_raster <- rij_matrix(sim_pu_zones_stack, sim_features) print(rij_zones_raster)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.