rangeMapper is a framework for the study of macroecological patterns of life-history traits.
rangeMapper in a nutshell
- Datasets (i.e. maps) are retrieved from
sqliteproject files as objects inheriting from
data.table. Maps can be plotted directly with
map = rangeMap.fetch(con, c('median_body_mass', 'median_clutch_size'), spatial = FALSE) plot(map, boundary = wrens_boundary, ncol = 2)
- The link between the assemblage level (i.e. the raster cell) and the species level (i.e. the data behind the raster cell) is kept explicit at all stages of the project.
MAPs are constructed based on
SQLaggregate functions or statistical models build in R and can be based on arbitrary subsets defined at both species and assemblage levels.
rangeMap.save(con, FUN = lmSlope, biotab = "life_history_traits", biotrait = "body_mass", tableName = "slope_bm_cs", formula = log(body_mass) ~ clutch_size, subset = list(MAP_species_richness = "SR >= 5", MAP_altitude = "altitude > 1000", BIO_biotab = "Family = 'Troglodytidae' AND clutch_size is not NULL") )
devtools::install_github("valcu/rangeMapper") # development. install.packages("rangeMapper") # stable.