as.data.frame: Get a data.frame with record id values (rID)

Description Usage Arguments Details Value Author(s) References Examples

Description

Converts a sdmdata object to a data.frame. By additional arguments, it is possible to make a quary on the dataset (see details).

Usage

1
2
## S4 method for signature 'sdmdata'
as.data.frame(x, ...)

Arguments

x

sdmdata object

...

Additional arguments (optional, see details)

Details

Following additional arguments optionally can be used to get a subset of data by specifying the record IDs; or using a query by specifying the name of species, and/or the name of data groups, and/or range of times (if time information are available):

ind: an intiger vector containing the record Ids; sp: a character vector of the name of species grp: a character vector of the group names (e.g., 'test'; if indipendent test is available) time: a vector of times (an appropriate time class or a character that can be converted into a time format)

Value

data.frame

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
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
file <- system.file("external/data.sdd", package="sdm")

d <- read.sdm(file)

d # a sdmdata object

df <- as.data.frame(d)
head(df)

# only the records with rID == c(1,2,3):
as.data.frame(d, ind=1:3)

## End(Not run)

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