if (FALSE) {
set.seed(1135)
data('speciesdata')
speciesdata$abundance <- rnorm(n = nrow(speciesdata), 4.3, 1.2)
spgeo1 <- speciesdata |>
sf::st_as_sf(coords = c('decimalLongitude', 'decimalLatitude'), crs = sf::st_crs(4326))
sptraits <- fw_fetchdata(data = speciesdata,
ecoparams = c('rheophily habitat', 'spawning habitat',
'feeding diet adult'),
taxonomic_column = 'scientificName',
organismgroup = 'fi')
#functional richness
testdata5 <- fw_fdcompute(fwdata = sptraits,
sitesdata = speciesdata,
sites = 'waterBody',
species = 'scientificName',
FD = TRUE)
}
Run the code above in your browser using DataLab