[go: up one dir, main page]

File: hc2Newick.Rd

package info (click to toggle)
r-bioc-ctc 1.80.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 452 kB
  • sloc: php: 52; makefile: 2
file content (40 lines) | stat: -rw-r--r-- 930 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
\name{hc2Newick}
\alias{hc2Newick}
\title{Convert hclust objects to Newick format files}
\description{
  Convert hclust objects to Newick format files.
}
\usage{
  hc2Newick(hc, flat=TRUE)
}
\arguments{
  \item{hc}{a \code{hclust} object (as returned by the function \code{hclust}
    in the package \code{stats})}
  \item{flat}{a boolean (see section value).}
}
\value{
  If \code{flat=TRUE} the result is a string (that you can write in a
  file).

  If \code{flat=FALSE} the result is a list (of lists). Each list
  is consituted of the elements \code{left}, \code{right} and \code{dist}.  
}

\examples{
data(USArrests)
h = hclust(dist(USArrests))
write(hc2Newick(h),file='hclust.newick')
}


\references{
  Antoine Lucas and Sylvain Jasson, \emph{Using amap and ctc Packages
    for Huge Clustering}, R News, 2006, vol 6, issue 5 pages 58-60.
  }


\author{
  Laurent (laurent@cbs.dtu.dk)
}
\keyword{manip}
\keyword{cluster}