Learn R Programming

ecospat (version 4.1.1)

ecospat.caleval: Calibration And Evaluation Dataset

Description

Generate an evaluation and calibration dataset with a desired ratio of disaggregation.

Usage

ecospat.caleval (data, xy, row.num=1:nrow(data), nrep=1, ratio=0.7, 
disaggregate=0, pseudoabs=0, npres=0, replace=FALSE)

Value

list("eval"=eval,"cal"=cal))

Arguments

data

A vector with presence-absence (0-1) data for one species.

xy

The x and y coordinates of the projection dataset.

row.num

Row original number

nrep

Number of repetitions

ratio

Ratio of disaggregation

disaggregate

Minimum distance of disaggregation (has to be in the same scale as xy)

pseudoabs

Number of pseudoabsences

npres

To select a smaller number of presences from the dataset to be subsetted. The maximum number is the total number of presences

replace

F to replace de pseudoabsences

Author

Blaise Petitpierre bpetitpierre@gmail.com

Details

This functions generates two list, one with the calibration or training dataset and other list with the evaluation or testing dataset disaggregated with a minimum distance.

Examples

Run this code
data <- ecospat.testData
caleval <- ecospat.caleval (data = ecospat.testData[53], xy = data[2:3], row.num = 1:nrow(data), 
nrep = 2, ratio = 0.7, disaggregate = 0.2, pseudoabs = 100, npres = 10, replace = FALSE)
caleval

Run the code above in your browser using DataLab