as.picante: converting between data formats for community phylogenetics

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

View source: R/dataManipulation.R

Description

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

Usage

1
as.picante(data, outfile = NULL)

Arguments

data

a community dataset in phylocom or spacodi format

outfile

an optional text file to which to write output

Details

This utility converts a community dataset (either from phylocom or spacodiR) into a format interpretable by picante (see picante-package). 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. The user has the option to save an output file, defined by outfile. SPACoDi format is similar to that for picante, where dataframes between these packages are transposed. SPACoDi format should have species as row names.

Value

An array, formatted for use in picante

Author(s)

Jonathan Eastman

See Also

as.spacodi and as.phylocom for converting between phylocom and SPACoDi formats; see picante-package for an R-port of phylocom

Examples

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

# convert to phylocom
as.phylocom(data=spl, 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)

# run standardized effect size mean nearest taxon distances in picante
ses.mntd(as.picante(spl), cophenetic(phy))

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