sdmApp_fold_Explorer: Explore the generated folds and visualize the placement of...

Description Usage Arguments Value Examples

Description

Explore the generated folds and visualize the placement of folds and distribution of species data over folds.

Usage

1
sdmApp_fold_Explorer(blocks, rasterLayer, speciesData, num)

Arguments

blocks

A SpatialBlock object.

rasterLayer

A raster object as background map for visualization.

speciesData

A simple features (sf) or SpatialPoints object containing species data (response variable).

num

A number of fold to assign as data test set.

Value

A map showing folds and the species data, that can be used to explore folds.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# load blockCV package data
library(blockCV)
awt <- raster::brick(system.file("extdata", "awt.grd", package = "blockCV"))
#import presence-absence species data
PA <- read.csv(system.file("extdata", "PA.csv", package = "blockCV"))
#make a sf object from data.frame
pa_data <- sf::st_as_sf(PA, coords = c("x", "y"), crs = raster::crs(awt))
#spatial blocking by specified range and random assignment
sb <- spatialBlock(speciesData = pa_data,species = "Species",
rasterLayer = awt,theRange = 70000,k = 5,
selection = "random",iteration = 100)
sdmApp_fold_Explorer(sb,awt,pa_data,1)

## End(Not run)

sdmApp documentation built on July 7, 2021, 9:06 a.m.