data(rotif.env)
head(rotif.env)
names(rotif.env)
# calculate plain distance to presence:
rotifers.dist0 <- distPres(rotif.env, sp.cols = 18:47,
coord.cols = c("Longitude", "Latitude"), id.col = 1, p = 1,
inv = FALSE, suffix = "_D") # in degrees (inconsistent across latitudes)
rotifers.dist <- distPres(rotif.env, sp.cols = 18:47,
coord.cols = c("Longitude", "Latitude"), id.col = 1, p = 1,
inv = FALSE, suffix = "_D", CRS = "EPSG:4326") # in meters
head(rotifers.dist)
# calculate inverse squared distance to presence:
rotifers.invd2 <- distPres(rotif.env, sp.cols = 18:47,
coord.cols = c("Longitude", "Latitude"), id.col = 1, p = 2,
inv = TRUE, suffix = "_iDsq", CRS = "EPSG:4326")
head(rotifers.invd2)
Run the code above in your browser using DataLab