extractIndex: Indexing to extract records of a sdmdata object

Description Methods Author(s) References Examples

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

http://r-gis.net

http://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
 5
 6
 7
 8
 9
10
11
12
13
14
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

sdm documentation built on April 30, 2020, 1:04 a.m.