subset {sdm} | R Documentation |
Subset models in a sdmModels object
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.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
## 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)