Description Usage Arguments Details Value Author(s) References Examples
Converts a sdmdata
object to a data.frame
. By additional arguments, it is possible to make a quary on the dataset (see details).
1 2 | ## S4 method for signature 'sdmdata'
as.data.frame(x, ...)
|
x |
sdmdata object |
... |
Additional arguments (optional, see 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)
data.frame
Babak Naimi naimi.b@gmail.com
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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.