/packages/archive/2010/04.2010/04.20.2010/spacodi/man/as.spacodi.Rd
Unknown | 38 lines | 26 code | 12 blank | 0 comment | 0 complexity | 38690a243cddbf490863183fe7f23dd8 MD5 | raw file
1\name{as.spacodi} 2 3\alias{as.spacodi} 4 5\title{converting between data formats for community phylogenetics} 6 7\usage{as.spacodi(data, outfile = NULL)} 8 9\arguments{ 10 \item{data}{a species-by-plots matrix} 11 \item{outfile}{an optional text file to which to write output} 12} 13 14\details{This utility converts a species-by-plots matrix into a format readable by the external program \code{SPACoDi}, a Windows executable. 15The user has the option to save an output file, defined by \code{outfile}. 16} 17 18\value{an array, formatted for use in \code{SPACoDi} for Windows} 19 20\author{Jonathan Eastman} 21 22\seealso{\code{\link{as.phylocom}} for converting between \code{phylocom} and \code{SPACoDi} formats; 23see \code{\link{spacodi.calc}} for community diversity measures of empirical data} 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 and write to file 34as.spacodi(p.foo, outfile="spacodi.formatted.txt") -> s.foo 35s.foo # re-converted SPACoDi dataset 36foo # comparison with the original dataset 37 38}