Learn R Programming

speciesgeocodeR (version 1.0-4)

Spgc2BioGeoBEARS: Geography Input for BioGeoBEARS

Description

Convert an object of the class spgeoOUT in the right format to be used as geography input for BioGeoBEARS.

Usage

Spgc2BioGeoBEARS(x, phyl = NULL, file = NULL, true.areas = T, true.species = T)

Arguments

x
an object of the clas 'spgeoOUT'
phyl
an object of the class phylo. An optional phylogeny to be used with BioGeoBEARS, to align species.
file
character. The complete path and filename to the outputfile.
true.areas
logical. If TRUE, areas with 0 species are removed from the matrix. Default = TRUE.
true.species
logical. If TRUE, species not occurring in any area are removed from the matrix. Default = TRUE.

Value

A file in the working directory and a list.

Details

This will create a file in the working directory.

Examples

Run this code
## Not run: 
# data(lemurs)
# data(mdg_poly)
# 
# outp <- SpGeoCod(lemurs, mdg_poly)
# conv <- Spgc2BioGeoBEARS(outp)
# ## End(Not run)

Run the code above in your browser using DataLab