| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/has_edgePar.R |
| 3 |
\name{has_component_in_attribute} |
| 4 |
\alias{has_component_in_attribute} |
| 5 |
\alias{has_edgePar} |
| 6 |
\alias{has_nodePar} |
| 7 |
\title{Does a dendrogram has an edgePar/nodePar component?} |
| 8 |
\usage{ |
| 9 |
has_component_in_attribute(dend, component, the_attrib = "edgePar", ...) |
| 10 |
} |
| 11 |
\arguments{ |
| 12 |
\item{dend}{a \link{dendrogram} object.} |
| 13 |
|
| 14 |
\item{component}{a character value to be checked if exists in the tree. For edgePar the list: "col", "lty" and "lwd" (for the segments), |
| 15 |
"p.col", "p.lwd", and "p.lty" (for the polygon around the text) and "t.col" for the text color. |
| 16 |
For edgePar "pch", "cex", "col", "xpd", and/or "bg".} |
| 17 |
|
| 18 |
\item{the_attrib}{A character of the attribute for which to check the existence of the component. |
| 19 |
Often either "edgePar" or "nodePar".} |
| 20 |
|
| 21 |
\item{...}{ignored} |
| 22 |
} |
| 23 |
\value{ |
| 24 |
Logical. TRUE if such a component is defined somewhere in the tree, FALSE otherwise. |
| 25 |
If dend is not a dendrogram, the function will return FALSE. |
| 26 |
} |
| 27 |
\description{ |
| 28 |
Does a dendrogram has an edgePar/nodePar component? |
| 29 |
} |
| 30 |
\examples{ |
| 31 |
|
| 32 |
dat <- iris[1:20, -5] |
| 33 |
hca <- hclust(dist(dat)) |
| 34 |
hca2 <- hclust(dist(dat), method = "single") |
| 35 |
dend <- as.dendrogram(hca) |
| 36 |
dend2 <- as.dendrogram(hca2) |
| 37 |
|
| 38 |
dend \%>\% |
| 39 |
set("branches_lwd", 2) \%>\% |
| 40 |
set("branches_lty", 2) \%>\% |
| 41 |
plot() |
| 42 |
dend \%>\% |
| 43 |
set("branches_lwd", 2) \%>\% |
| 44 |
set("branches_lty", 2) \%>\% |
| 45 |
has_edgePar("lty") |
| 46 |
dend \%>\% |
| 47 |
set("branches_lwd", 2) \%>\% |
| 48 |
has_edgePar("lty") |
| 49 |
dend \%>\% |
| 50 |
set("branches_lwd", 2) \%>\% |
| 51 |
has_edgePar("lwd") |
| 52 |
|
| 53 |
dend \%>\% |
| 54 |
set("branches_lwd", 2) \%>\% |
| 55 |
set("clear_branches") \%>\% |
| 56 |
has_edgePar("lwd") |
| 57 |
} |
| 58 |
\seealso{ |
| 59 |
\link{get_nodes_attr}, \link{set} |
| 60 |
} |