to_spatial {phylospatial} | R Documentation |
Convert a site-by-variable matrix into a SpatRaster or sf object
Description
Convert a site-by-variable matrix into a SpatRaster or sf object
Usage
to_spatial(m, template)
Arguments
m |
Matrix or vector. |
template |
|
Value
SpatRaster
with a layer for every column in m
, or sf
data frame with
a variable for every column in m
, depending on the data type of template
.
Examples
ps <- moss()
to_spatial(ps$comm[, 1:5], ps$spatial)
[Package phylospatial version 1.1.1 Index]