File: rotate_DendSer.Rd

package info (click to toggle)
r-cran-dendextend 1.14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,888 kB
  • sloc: sh: 13; makefile: 2
file content (50 lines) | stat: -rw-r--r-- 1,314 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
41
42
43
44
45
46
47
48
49
50
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DendSer.R
\name{rotate_DendSer}
\alias{rotate_DendSer}
\title{Rotates dend based on DendSer}
\usage{
rotate_DendSer(dend, ser_weight, ...)
}
\arguments{
\item{dend}{An object of class dendrogram}

\item{ser_weight}{Used by cost function to evaluate
 ordering. For cost=costLS, this is a vector of
  object weights. Otherwise is a dist or symmetric matrix.
passed to \link{DendSer.dendrogram} and from
there to \link[DendSer]{DendSer}.

If it is missing, the cophenetic distance is used instead.}

\item{...}{parameters passed to \link[DendSer]{DendSer}}
}
\value{
Numeric vector giving an optimal dendrogram order
}
\description{
Rotates a dendrogram based on its seriation

The function tries to turn the dend into hclust using
\link{DendSer.dendrogram} (based on \link[DendSer]{DendSer})

Also, if a distance matrix is missing, it will try
to use the \link{cophenetic} distance.
}
\examples{
\dontrun{
library(DendSer) # already used from within the function

dend <- USArrests[1:4, ] \%>\%
  dist() \%>\%
  hclust("ave") \%>\%
  as.dendrogram()
DendSer.dendrogram(dend)

tanglegram(dend, rotate_DendSer(dend))
}
}
\seealso{
\code{\link[DendSer]{DendSer}}, \link{DendSer.dendrogram} ,
\link{untangle_DendSer}, \link{rotate_DendSer}
}