as.spacodi: converting between data formats for community phylogenetics

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

View source: R/dataManipulation.R

Description

as.spacodi converts from picante or phylocom data formats into spacodi format.

Usage

1
as.spacodi(data, outfile = NULL)

Arguments

data

a community dataset in phylocom or picante format

outfile

an optional text file to which to write output

Details

This utility converts a community dataset (either from phylocom or picante (see picante) into a format interpretable by either this R-package spacodiR or the external program SPACoDi, a Windows executable (available at http://ebe.ulb.ac.be/ebe/Software.html). Note also that the community-dataset format used here is also that called for by the package vegan; see vegandocs.

phylocom format is also referred to as triplet-formatting, where plots are within the first column, abundances in the second, and species names in the third column of the dataframe. picante format is simply the transpose of spacodiR-formatting of the community dataset: in spacodiR, species are expected as the row names of the dataframe, where plots are represented as the column names. The user has the option to save an output file, defined by outfile.

Value

An array, formatted for use in spacodiR

Author(s)

Jonathan Eastman

See Also

as.phylocom; as.picante

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# call example data from spacodiR
data(sp.example)
attach(sp.example)
spl->d.spacodi  
d.spacodi ## SPACoDi format

# convert to phylocom
as.phylocom(data=d.spacodi, picante=FALSE)->d.phylocom
d.phylocom ## phylocom format

# convert dataset to picante
as.picante(data=d.phylocom)->d.picante
d.picante ## picante format

# convert back to SPACoDi 
as.spacodi(data=d.picante)

spacodiR documentation built on May 2, 2019, 8:26 a.m.