| CompadreDB {Rcompadre} | R Documentation |
CompadreDB Class
Description
This page describes the CompadreDB class, including methods for accessing the
slots (see functions CompadreData and VersionData), accessing
($) and replacing ($<-) columns within the data slot,
accessing elements from the version slot (see functions
VersionData and DateCreated), and converting legacy database
objects to the CompadreDB class (see as_cdb).
Usage
CompadreData(object)
## S4 method for signature 'CompadreDB'
CompadreData(object)
## S4 method for signature 'CompadreDB'
x$name
## S4 replacement method for signature 'CompadreDB'
x$name <- value
## S4 method for signature 'CompadreDB,ANY,missing'
x[[i, j, ...]]
## S4 replacement method for signature 'CompadreDB,ANY,missing'
x[[i, j]] <- value
VersionData(object)
## S4 method for signature 'CompadreDB'
VersionData(object)
Version(object)
## S4 method for signature 'CompadreDB'
Version(object)
DateCreated(object)
## S4 method for signature 'CompadreDB'
DateCreated(object)
Arguments
object |
A CompadreDB object |
x |
A CompadreDB object |
name |
The name of a column within x |
value |
Vector of values to assign to the column |
i, j |
elements to extract or replace (see [[.data.frame) |
... |
ignored |
Slots
dataA tibble-style data frame with a list-column of matrix population models (column
mat) and a variety of other metadata columns.versionA list with elements
Version(database version number),DateCreated(date of version release), andAgreement(a url link to the User Agreement)
Author(s)
Iain M. Stott
Tamora D. James
See Also
CompadreDB-Methods CompadreDB-Subsetting
Examples
# extract entire 'data' slot
dat <- CompadreData(Compadre)
# access the date of database creation
DateCreated(Compadre)
# extract column SpeciesAccepted
Compadre$SpeciesAccepted
# create new list-column with stage-specific survival
Compadre$stage_survival <- lapply(Compadre$mat, function(x) colSums(x@matU))