Case study 2: Geographical variation in the relationship between range size and body size

Mihai Valcu

2019-03-26

Appendix S3

Supporting information in Valcu, M., Dale, J., and Kempenaers, B. (2012). rangeMapper: a platform for the study of macroecology of life-history traits. Global Ecology and Biogeography 21, 945-951.

The example shown here is run on the wrens dataset which is part of the package. The wrens dataset has 84 species while the case study presented in the paper was run on 8434 bird species. Therefore both the settings and the results shown below are not identical with the results presented in Valcu et al 2012.

Project Set Up

For a step-by-step project set-up see Case study 1.

## New session 2019-03-26 17:22:26
## PROJECT: wrens.sqlite 
## DIRECTORY: /tmp/Rtmp6x8Ng1
## Grid size set to 2.5 map units.
## Canvas uploaded.
## Writing overlay output to project...
## 84 out of 84 ranges updated; Elapsed time: 0 mins
## Extracting metadata...
## Table biotab saved as a  BIO_ table
## +______________+
## class            rangeMap
## Project_location /tmp/Rtmp6x8Ng1/wrens.sqlite
## Proj4            +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs
## CellSize         2.5
## Extent           xmin=-164.8716,xmax=-34.60225,ymin=-55.72056,ymax=61.5632
## BIO_tables       biotab
## MAP_tables       species_richness;median_body_mass
## METADATA_RANGES  Area
## +______________+

Convert metadata_ranges table to a life-history BIO_ table.

## Table metadata_ranges saved as a  BIO_ table

Merge the newly converted metadata_ranges to the other life-history table(s) previously saved.

## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries

## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## data frame with 0 columns and 0 rows

Define New Functions

The newly defined function should take formula & data as arguments and should return a numeric vector of length 1. We define a simple wrapper around the rlm function in MASS package to extract a robust regression slope for each assembladge (i.e. canvas cell).

Note that:

Map the Area ~ Body Mass slope using the user-defined function

## [1] TRUE

Additionally map the breeding range area

## [1] TRUE

Plot maps