Skip to contents

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 class 'CompadreDB'
CompadreData(object)

# S4 method for class 'CompadreDB'
x$name

# S4 method for class 'CompadreDB'
x$name <- value

# S4 method for class 'CompadreDB,ANY,missing'
x[[i, j, ...]]

# S4 method for class 'CompadreDB,ANY,missing'
x[[i, j]] <- value

VersionData(object)

# S4 method for class 'CompadreDB'
VersionData(object)

Version(object)

# S4 method for class 'CompadreDB'
Version(object)

DateCreated(object)

# S4 method for class '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

data

A tibble-style data frame with a list-column of matrix population models (column mat) and a variety of other metadata columns.

version

A list with elements Version (database version number), DateCreated (date of version release), and Agreement (a url link to the User Agreement)

Author

Iain M. Stott

Tamora D. James

Examples

# extract entire 'data' slot
dat <- CompadreData(Compadre)

# access the date of database creation
DateCreated(Compadre)
#> [1] "Nov_22_2017"

# extract column SpeciesAccepted
Compadre$SpeciesAccepted
#>   [1] "Setaria incrassata"                  
#>   [2] "Lechea cernua"                       
#>   [3] "Actinostemon concolor"               
#>   [4] "Gaura neomexicana coloradensis"      
#>   [5] "Eriogonum longifolium gnaphalifolium"
#>   [6] "Platanthera hookeri"                 
#>   [7] "Succisa pratensis"                   
#>   [8] "Pyrrocoma radiata"                   
#>   [9] "Astragalus tremolsianus"             
#>  [10] "Plantago coronopus"                  
#>  [11] "Silene glaucifolia pseudoviscosa"    
#>  [12] "Astragalus peckii"                   
#>  [13] "Jacquiniella leucomelana"            
#>  [14] "Syngonanthus nitens"                 
#>  [15] "Astragalus scaphoides"               
#>  [16] "Phyllanthus indofischeri"            
#>  [17] "Heliconia metallica"                 
#>  [18] "Pediocactus bradyi"                  
#>  [19] "Clarkia xantiana"                    
#>  [20] "Trollius europaeus"                  
#>  [21] "Miconia prasina"                     
#>  [22] "Eriophorum angustifolium triste"     
#>  [23] "Molinia caerulea"                    
#>  [24] "Saxifraga tridactylites"             
#>  [25] "Pachycereus pecten-aboriginum"       
#>  [26] "Brassica insularis"                  
#>  [27] "Limonium geronense"                  
#>  [28] "Myosotis ramosissima"                
#>  [29] "Tradescantia brevifolia"             
#>  [30] "Stenaria nigricans"                  
#>  [31] "Alyxia stellata"                     
#>  [32] "Trillium ovatum"                     
#>  [33] "Commelina benghalensis"              
#>  [34] "Cleistesiopsis bifaria"              
#>  [35] "Calochortus lyallii"                 
#>  [36] "Hypochaeris radicata"                
#>  [37] "Eryngium cuneifolium"                
#>  [38] "Plantago coronopus"                  
#>  [39] "Armeria caespitosa"                  
#>  [40] "Primula vulgaris"                    
#>  [41] "Primula veris"                       
#>  [42] "Lomatium bradshawii"                 
#>  [43] "Iriartea deltoidea"                  
#>  [44] "Sarcocapnos pulcherrima"             
#>  [45] "Agropyron cristatum"                 
#>  [46] "Astragalus tyghensis"                
#>  [47] "Gilia tenuiflora hoffmannii"         
#>  [48] "Verbascum fontqueri"                 
#>  [49] "Pyrrocoma radiata"                   
#>  [50] "Phyllanthus indofischeri"            
#>  [51] "Carduus nutans"                      
#>  [52] "Impatiens capensis"                  
#>  [53] "Cirsium scariosum"                   
#>  [54] "Solidago mollis"                     
#>  [55] "Hypericum cumulicola"                
#>  [56] "Viola biflora"                       
#>  [57] "Lepidium davisii"                    
#>  [58] "Cleistesiopsis bifaria"              
#>  [59] "Armeria caespitosa"                  
#>  [60] "Lepanthes rupestris"                 
#>  [61] "Aechmea nudicaulis"                  
#>  [62] "Androsace elongata"                  
#>  [63] "Borassus aethiopum"                  
#>  [64] "Themeda triandra"                    
#>  [65] "Abies magnifica"                     
#>  [66] "Echinacea angustifolia"              
#>  [67] "Asplenium adulterinum"               
#>  [68] "Vella pseudocytisus"                 
#>  [69] "Viola biflora"                       
#>  [70] "Cheirolophus metlesicsii"            
#>  [71] "Castanea dentata"                    
#>  [72] "Anthericum ramosum"                  
#>  [73] "Plantago media"                      
#>  [74] "Lepidium davisii"                    
#>  [75] "Lupinus lepidus"                     
#>  [76] "Cirsium pitcheri"                    
#>  [77] "Melampyrum pratense"                 
#>  [78] "Cleistesiopsis bifaria"              
#>  [79] "Lepanthes rupestris"                 
#>  [80] "Pterocereus gaumeri"                 
#>  [81] "Sambucus sieboldiana"                
#>  [82] "Pyrrocoma radiata"                   
#>  [83] "Daphne rodriguezii"                  
#>  [84] "Fucus vesiculosus"                   
#>  [85] "Carduus nutans"                      
#>  [86] "Tragopogon orientalis"               
#>  [87] "Asarum canadense"                    
#>  [88] "Helianthus divaricatus"              
#>  [89] "Himatanthus drasticus"               
#>  [90] "Armeria maritima"                    
#>  [91] "Astragalus alopecurus"               
#>  [92] "Phyllanthus emblica"                 
#>  [93] "Dorycnium spectabile"                
#>  [94] "Lotus corniculatus"                  
#>  [95] "Astragalus scaphoides"               
#>  [96] "Asplenium adulterinum"               
#>  [97] "Miscanthus giganteus"                
#>  [98] "Androsace elongata"                  
#>  [99] "Asarum canadense"                    
#> [100] "Magnolia salicifolia"                
#> [101] "Lepidium davisii"                    
#> [102] "Echinacea angustifolia"              
#> [103] "Hordeum spontaneum"                  
#> [104] "Phyllanthus indofischeri"            
#> [105] "Paronychia jamesii"                  
#> [106] "Aster amellus"                       
#> [107] "Tragopogon pratensis"                
#> [108] "Ambrosia dumosa"                     
#> [109] "Succisa pratensis"                   
#> [110] "Lupinus lepidus"                     
#> [111] "Physaria ovalifolia"                 
#> [112] "Sphaeralcea coccinea"                
#> [113] "Lotus corniculatus"                  
#> [114] "Mammillaria crucigera"               
#> [115] "Calochortus lyallii"                 
#> [116] "Cirsium dissectum"                   
#> [117] "Heliconia acuminata"                 
#> [118] "Saxifraga tridactylites"             
#> [119] "Vella pseudocytisus"                 
#> [120] "Daphne rodriguezii"                  
#> [121] "Astragalus peckii"                   
#> [122] "Pyrrocoma radiata"                   
#> [123] "Trillium ovatum"                     
#> [124] "Hordeum spontaneum"                  
#> [125] "Acer palmatum"                       
#> [126] "Lupinus tidestromii"                 
#> [127] "Cleistesiopsis bifaria"              
#> [128] "Manilkara zapota"                    
#> [129] "Collinsia verna"                     
#> [130] "Primula vulgaris"                    
#> [131] "Gracilaria gracilis"                 
#> [132] "Commelina benghalensis"              
#> [133] "Stenaria nigricans"                  
#> [134] "Echinacea angustifolia"              
#> [135] "Chamaedorea radicalis"               
#> [136] "Carex aquatilis minor"               
#> [137] "Cucurbita pepo"                      
#> [138] "Rhododendron ponticum"               
#> [139] "Festuca gracillima"                  
#> [140] "Platanthera hookeri"                 
#> [141] "Molinia caerulea"                    
#> [142] "Aster amellus"                       
#> [143] "Helenium virginicum"                 
#> [144] "Lactuca serriola"                    
#> [145] "Chamaedorea radicalis"               
#> [146] "Antirrhinum subbaeticum"             
#> [147] "Geranium sylvaticum"                 
#> [148] "Aster amellus"                       
#> [149] "Bromus tectorum"                     
#> [150] "Echinacea angustifolia"              

# create new list-column with stage-specific survival
Compadre$stage_survival <- lapply(Compadre$mat, function(x) colSums(x@matU))