inputs_chk {divraster} | R Documentation |
Check if objects are valid
Description
Check if objects are valid
Usage
inputs_chk(bin1, bin2, tree)
Arguments
bin1 |
A SpatRaster with presence-absence data (0 or 1) for a set of species. |
bin2 |
A SpatRaster with presence-absence data (0 or 1) for a set of species. Species names in 'bin2' and 'bin1' must match! |
tree |
It can be a 'data.frame' with species traits or a 'phylo' with a rooted phylogenetic tree. Species names in 'tree', 'bin1', and 'bin2' must match! |
Value
Either a success message or an error.
Examples
library(terra)
bin1 <- terra::rast(system.file("extdata", "ref.tif",
package = "divraster"))
bin2 <- terra::rast(system.file("extdata", "fut.tif",
package = "divraster"))
traits <- read.csv(system.file("extdata", "traits.csv",
package = "divraster"), row.names = 1)
tree <- ape::read.tree(system.file("extdata", "tree.tre",
package = "divraster"))
inputs_chk(bin1, bin2, tree)
[Package divraster version 1.0.4 Index]