add: add a new method to the package

Description Usage Arguments Details Value Author(s) References Examples

Description

This function is an interface to extend the package. A user can define a new method band add it to the package. When the method is successfully added, it can be used together with all existing methods. The names of available methods in the package can be seen using getmethodNames. It is not limited only to modelling (fitting) methods, but can be a replication method, or one to generate pseudo-absences, etc.

You can get an object of an existing method through getmethod.

Usage

1
2
3
4
5
add(x,w,echo,...)

getmethod(x,w,...)

getmethodNames(w,...)

Arguments

x

Either a list, or an object generated by getmethod function

w

specify which group of methods the new method belongs to. "sdm" (default) can be used for modelling method

echo

logical (default=TRUE), determines whether a message should be printed to report if the adding is successful

...

additional arguments. see details

Details

These functions provide flexibility to extend the package by adding new methods. It is also possible to add several instances of an existing method to have, for example, a method with different settings at the same time. Whetevet the new method is, it can also be shared and used by other users.

Value

getmethod gives an object of an appropriate class depending on w.

getmethodNames generate a list (if alt=TRUE is provided as additional argument) containing the name of methods and all alternative names (aliases) specified for each method, or a character vector (if alt=FALSE) containing the main names.

Author(s)

Babak Naimi naimi.b@gmail.com

https://www.r-gis.net/

https://www.biogeoinformatics.org

References

Naimi, B., Araujo, M.B. (2016) sdm: a reproducible and extensible R platform for species distribution modelling, Ecography, 39:368-375, DOI: 10.1111/ecog.01881

Examples

1
2
3
4
## Not run: 
getmethodNames('sdm')

## End(Not run)

Example output

Loading required package: sp
sdm 1.0-67 (2019-02-26)
Loading required package: dismo
Loading required package: raster
Loading required package: gbm
Loaded gbm 2.1.5
Loading required package: tree
Loading required package: mda
Loading required package: class
Loaded mda 0.4-10

Loading required package: mgcv
Loading required package: nlme

Attaching package: 'nlme'

The following object is masked from 'package:raster':

    getData

This is mgcv 1.8-28. For overview type 'help("mgcv-package")'.
Loading required package: glmnet
Loading required package: Matrix
Loading required package: foreach
Loaded glmnet 2.0-16

Loading required package: earth
Loading required package: Formula
Loading required package: plotmo
Loading required package: plotrix
Loading required package: TeachingDemos
Loading required package: rJava
Loading required package: RSNNS
Loading required package: Rcpp
Loading required package: randomForest
randomForest 4.6-14
Type rfNews() to see new features/changes/bug fixes.
Loading required package: rpart
Loading required package: kernlab

Attaching package: 'kernlab'

The following objects are masked from 'package:raster':

    buffer, rotated

$bioclim
[1] "bioclim" "Bioclim"

$bioclim.dismo
[1] "bioclim.dismo" "BioclimDismo"  "bioclimDismo"  "bioclim.dis"  
[5] "bioclimD"     

$brt
[1] "brt" "BRT" "gbm" "GBM"

$cart
[1] "cart" "CART" "tree"

$domain.dismo
[1] "domain.dismo" "DomainDismo"  "domainDismo"  "domain.dis"   "domainD"     

$fda
[1] "fda" "FDA"

$gam
[1] "gam" "GAM"

$glm
[1] "glm" "GLM" "lm" 

$glmnet
[1] "glmnet"     "GLMNET"     "glmelastic" "glmlasso"  

$mahal.dismo
[1] "mahal.dismo"       "MahalDismo"        "mahalanoubisDismo"
[4] "mahal.dis"         "mahalD"           

$mars
[1] "mars"  "MARS"  "earth"

$maxent
[1] "maxent"     "Maxent"     "MAXENT"     "entropy"    "maxentropy"

$maxlike
[1] "maxlike" "MaxLike"

$mda
[1] "mda" "MDA"

$mlp
[1] "mlp"      "MLP"      "nnet.mlp" "nnetMLP" 

$rbf
[1] "rbf"      "RBF"      "nnet.rbf" "nnetRbf" 

$rf
[1] "rf"           "RF"           "randomForest" "rforest"     

$rpart
[1] "rpart" "RPART"

$svm
[1] "svm"  "SVM"  "ksvm"

sdm documentation built on Nov. 12, 2021, 9:06 a.m.

Related to add in sdm...