/packages/archive/2010/04.2010/04.20.2010/spacodi/man/as.phylocom.Rd

http://github.com/eastman/spacodiR · Unknown · 41 lines · 27 code · 14 blank · 0 comment · 0 complexity · 058d6651839b0d745e5f3208d0dfa13e MD5 · raw file

  1. \name{as.phylocom}
  2. \alias{as.phylocom}
  3. \title{converting between data formats for community phylogenetics}
  4. \usage{as.phylocom(data, outfile = NULL)}
  5. \arguments{
  6. \item{data}{a species-by-plots matrix}
  7. \item{outfile}{an optional text file to which to write output}
  8. }
  9. \details{This utility converts a species-by-plots matrix into \code{triplet} format, which is readable by the external program \code{phylocom}.
  10. The user has the option to save an output file, defined by \code{outfile}.
  11. }
  12. \value{an array, formatted for use in \code{phylocom}}
  13. \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.}
  14. \author{Jonathan Eastman}
  15. \seealso{\code{\link{as.spacodi}} for converting between \code{phylocom} and \code{SPACoDi} formats.}
  16. \examples{
  17. # generate a species-by-plots matrix
  18. foo <- r.plot(species=10,plots=6,missing.prop=0.15,sim.tree=FALSE)
  19. # convert to phylocom format
  20. as.phylocom(foo) -> p.foo
  21. p.foo
  22. # convert back to spacodi format
  23. as.spacodi(p.foo) -> s.foo
  24. s.foo
  25. # save the converted dataset to working directory
  26. as.phylocom(s.foo, outfile="phylocom.in.triplet.txt")
  27. }