read_controls: Read a file with the total number of detections in a...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/BioGeoBEARS_detection_v1.R

Description

This function reads in a tab-delimited text file containing counts of detections of the taphonomic controls in each region. These numbers should always be equal to or larger than the counts in the detections file.

Usage

1
2
  read_controls(controls_fn, OTUnames = NULL,
    areanames = NULL, tmpskip = 0, phy = NULL)

Arguments

controls_fn

The filename of the file containing the counts of taphonomic control detections.

OTUnames

Default NULL, in which case the first column of the text file is used as row names/OTU names.

areanames

Default NULL, in which case the text file column headings are used.

tmpskip

How many lines should be skipped before reading the text file? Default 0.

phy

An ape phylo object. If included, the rows will be sorted to match the order of tree tip labels.

Details

The idea of taphonomic controls dates back at least to work of Bottjer & Jablonski (1988). The basic idea is that if you have taxa of roughly similar detectability, then detections of other taxa give some idea of overall detection effort. Obviously this is a very simple model that can be criticized in any number of ways (different alpha diversity in each region, different detectability of individual taxa, etc.), but it is a useful starting point as there has been no implementation of any detection model in historical/phylogenetic biogeography to date.

One could imagine (a) every OTU and area has a different count of detections and taphonomic control detections, or (b) the taphonomic control detections are specified by area, and shared across all OTUs. Situation (b) is likely more common, but this function implements (a). Behavior (b) could be reproduced by summing each column, and/or copying this sum to all cells for a particular area.

Value

dtf

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster

Matzke_2012_IBS

Bottjer_Jablonski_1988

See Also

rcpp_calc_anclikes_sp_COOweights_faster

Examples

1
testval=1

Example output

Loading required package: rexpokit
Loading required package: cladoRcpp
Loading required package: ape
Loading required package: phylobase

Attaching package: 'phylobase'

The following object is masked from 'package:ape':

    edges

BioGeoBEARS documentation built on May 29, 2017, 8:36 p.m.