/packages/archive/2010/04.2010/04.20.2010/spacodi/man/as.phylocom.Rd
Unknown | 41 lines | 27 code | 14 blank | 0 comment | 0 complexity | 058d6651839b0d745e5f3208d0dfa13e MD5 | raw file
1\name{as.phylocom} 2 3\alias{as.phylocom} 4 5\title{converting between data formats for community phylogenetics} 6 7\usage{as.phylocom(data, outfile = NULL)} 8\arguments{ 9 \item{data}{a species-by-plots matrix} 10 \item{outfile}{an optional text file to which to write output} 11} 12 13\details{This utility converts a species-by-plots matrix into \code{triplet} format, which is readable by the external program \code{phylocom}. 14The user has the option to save an output file, defined by \code{outfile}. 15} 16 17\value{an array, formatted for use in \code{phylocom}} 18 19\references{WEBB CO, DD ACKERLY and SW KEMBEL. 2008. Phylocom: software for the analysis of phylogenetic community structure and trait evolution. Bioinformatics 24:2098-2100.} 20 21\author{Jonathan Eastman} 22 23\seealso{\code{\link{as.spacodi}} for converting between \code{phylocom} and \code{SPACoDi} formats.} 24 25\examples{ 26# generate a species-by-plots matrix 27foo <- r.plot(species=10,plots=6,missing.prop=0.15,sim.tree=FALSE) 28 29# convert to phylocom format 30as.phylocom(foo) -> p.foo 31p.foo 32 33# convert back to spacodi format 34as.spacodi(p.foo) -> s.foo 35s.foo 36 37# save the converted dataset to working directory 38as.phylocom(s.foo, outfile="phylocom.in.triplet.txt") 39 40 41}