# NOT RUN {
# import presence-absence species data
PA <- read.csv(system.file("extdata", "PA.csv", package = "blockCV"))
# coordinate reference system
Zone55s <- "+proj=utm +zone=55 +south +ellps=GRS80 +units=m +no_defs"
# make a sf object from data.frame
pa_data <- sf::st_as_sf(PA, coords = c("x", "y"), crs = Zone55s)
# buffering with presence-absence data
bf1 <- buffering(speciesData= pa_data,
species= "Species",
theRange= 70000,
spDataType = "PA",
progress = TRUE)
# import presence-background species data
PB <- read.csv(system.file("extdata", "PB.csv", package = "blockCV"))
# make a sf object from data.frame
pb_data <- sf::st_as_sf(PB, coords = c("x", "y"), crs = Zone55s)
# buffering with presence-background data
bf2 <- buffering(speciesData= pb_data,
species= "Species",
theRange= 70000,
spDataType = "PB",
addBG = TRUE, # add background data to testing folds
progress = TRUE)
# buffering with no species attribute
bf3 <- buffering(speciesData = pa_data,
theRange = 70000)
# }
Run the code above in your browser using DataLab