Debian Codegraph @

man/rotate_DendSer.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/DendSer.R
3 \name{rotate_DendSer}
4 \alias{rotate_DendSer}
5 \title{Rotates dend based on DendSer}
6 \usage{
7 rotate_DendSer(dend, ser_weight, ...)
8 }
9 \arguments{
10 \item{dend}{An object of class dendrogram}
11
12 \item{ser_weight}{Used by cost function to evaluate
13 ordering. For cost=costLS, this is a vector of
14 object weights. Otherwise is a dist or symmetric matrix.
15 passed to \link{DendSer.dendrogram} and from
16 there to \link[DendSer]{DendSer}.
17
18 If it is missing, the cophenetic distance is used instead.}
19
20 \item{...}{parameters passed to \link[DendSer]{DendSer}}
21 }
22 \value{
23 Numeric vector giving an optimal dendrogram order
24 }
25 \description{
26 Rotates a dendrogram based on its seriation
27
28 The function tries to turn the dend into hclust using
29 \link{DendSer.dendrogram} (based on \link[DendSer]{DendSer})
30
31 Also, if a distance matrix is missing, it will try
32 to use the \link{cophenetic} distance.
33 }
34 \examples{
35 \dontrun{
36 library(DendSer) # already used from within the function
37
38 dend <- USArrests[1:4, ] \%>\%
39 dist() \%>\%
40 hclust("ave") \%>\%
41 as.dendrogram()
42 DendSer.dendrogram(dend)
43
44 tanglegram(dend, rotate_DendSer(dend))
45 }
46 }
47 \seealso{
48 \code{\link[DendSer]{DendSer}}, \link{DendSer.dendrogram} ,
49 \link{untangle_DendSer}, \link{rotate_DendSer}
50 }