pickMedian: pickMedian

Description Usage Arguments Details Value References Examples

View source: R/pick_median.R

Description

pick median method

Usage

1
pickMedian(env.stack, subset = NULL, stack = FALSE)

Arguments

env.stack

a rasterStack object that contain the environment variable

subset

subset is a string vector that contain environment variables names which into calculate, if NULL that all var in env.stack will calculate.

stack

stack is an option that if you want not compose them togethor (result return as a rasterStack). Default is FALSE

Details

This method mainly implement pick median method

Value

rasterLayer or rasterStack if stack is set to TRUE

References

Lobo, J. M., & Tognelli, M. F. (2011). Exploring the effects of quantity and location of pseudo-absences and sampling biases on the performance of distribution models with limited point occurrence data. Journal for Nature Conservation, 19(1), 1-7.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# load the sdmvspecies library
library("sdmvspecies")
library("raster")
# find package's location
package.dir <- system.file(package="sdmvspecies")
# let see where is our sdmvspecies is installed in
package.dir
# find env dir under the package's location
env.dir <- paste(package.dir, "/external/env/", sep="")
# let see env dir
env.dir
# get the environment raster file
files <- list.files(path=env.dir, pattern="*.bil$", full.names=TRUE)
# make raster stack
env.stack <- stack(files)
# run pick mean
species.raster <- pickMedian(env.stack)
# plot map
plot(species.raster)

sdmvspecies documentation built on May 2, 2019, 5:11 a.m.