Extract by index {sdm} | R Documentation |
Indexing to extract records of a sdmdata object
Description
This function extracts records of a sdmdata
object and generates a new object of the same type (if drop=FALSE; otherwise a data.frame).
In sdmdata
, rID is the unique ID for each record.
Methods
x[i]
Arguments
x | a Raster* object | |
i | an index: record id (rID) in sdmdata object | |
drop | If TRUE , a data.frame is returned, otherwise a sdmdata object is returned. |
|
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, 39:368-375, DOI: 10.1111/ecog.01881
Examples
file <- system.file("external/data.sdd", package="sdm")
d <- read.sdm(file)
# see the number of records:
d
d2 <- d[1:10]
d2
d3 <- d[1:10,drop=TRUE]
d3
[Package sdm version 1.2-46 Index]