subset: Subset models in a sdmModels object

Description Details Value Methods Author(s) References Examples

Description

This function extracts a subset of models from a sdmModels object. In generates a new object of the same typeas the origical object. In sdmModels, modelID provides the unique IDs.

Instead of using the subset function, double brackes '[[ ]]' can be used.

Details

#

Value

sdmModels object

Methods

subset(x, subset, drop=TRUE, ...)

x[[i,...]]

Arguments:

x - sdmModels object

i- integer. Indicates the index/id of the models (modelID) should be extracted from sdmModels object

subset - Same as i

drop - If TRUE, new modelIDs are generated, otherwise, the original modelIDs are kept in the new object.

... - additional arguments (not impplemented yet!)

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, DOI: 10.1111/ecog.01881

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## Not run: 
file <- system.file("external/model.sdm", package="sdm")

m <- read.sdm(file)

m

getModelInfo(m)


m1 <- m[[3:4]]

m1

getModelInfo(m1)

m2 <- m[[3:4,drop=FALSE]]

m2

getModelInfo(m2)

#---- the following is the same as previous:

m2 <- subset(m,3:4,drop=FALSE)

m2

getModelInfo(m2)

## End(Not run) 

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

Related to subset in sdm...