Learn R Programming

NicheBarcoding (version 1.0)

pseudo.absent.points: Generation of pseudo absent points for niche model building

Description

Randomly generate pseudo points outside the 95%CI of the ecological space of the present data when there is no absent data for building a niche model.

Usage

pseudo.absent.points(data, outputNum = 500, en.vir = NULL, map = TRUE)

Arguments

data

Data frame, longitude and latitude of a single species.

outputNum

Numeric, the expected number of points.

en.vir

RasterBrick, the globle bioclimate data obtained from "raster::getData" function.

map

Logical. Should a map be drawn?

Value

A data frame of simulated pseudo points.

A data frame of bioclimate variables of each pseudo points.

Examples

Run this code
# NOT RUN {
data(en.vir)
#envir<-raster::getData("worldclim",download=FALSE,var="bio",res=2.5)
#en.vir<-raster::brick(envir)

data<-data.frame(species=rep("Acosmeryx anceus",3),
                 Lon=c(145.380,145.270,135.461),
                 Lat=c(-16.4800,-5.2500,-16.0810))

absent.points<-pseudo.absent.points(data,en.vir=en.vir,outputNum=100)
head(absent.points$lonlat)
head(absent.points$envir)
# }

Run the code above in your browser using DataLab