Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/dataManipulation.R
as.phylocom
converts from spacodi
or picante
data formats into phylocom
format.
1 | as.phylocom(data, picante=FALSE, outfile = NULL)
|
data |
a community dataset in either spacodiR or picante format (with species as row names and plots as column names or vice versa) |
picante |
Boolean; if current data format is |
outfile |
an optional text file to which to write output |
This utility converts a species-by-plots matrix into triplet
format, which is readable by the external program phylocom
. If
picante=TRUE
, the data are expected to be in the form used for picante (i.e., a plots-by-species matrix; picante-package
). If the user selects
picante=FALSE
, the data are expected to be in the form used for spacodiR (i.e., a species-by-plots matrix).
The user has the option to save an output file, defined by outfile
.
A named array, formatted for use in phylocom
; note that while the R-object returned by this function has column names, if output is written to a file,
the header is dropped (as appropriate for use in the external phylocom
executable: http://www.phylodiversity.net/phylocom/).
Jonathan Eastman
WEBB CO, DD ACKERLY and SW KEMBEL. 2008. Phylocom: software for the analysis of phylogenetic community structure and trait evolution. Bioinformatics 24:2098-2100.
as.spacodi
and as.picante
for converting between phylocom
and SPACoDi
formats; see picante-package
for an R-port of phylocom
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.