| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/common_subtrees.R |
| 3 |
\name{rank_values_with_clusters} |
| 4 |
\alias{rank_values_with_clusters} |
| 5 |
\title{Rank a vector based on clusters} |
| 6 |
\usage{ |
| 7 |
rank_values_with_clusters(x, ignore0 = FALSE, ...) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{x}{numeric vector} |
| 11 |
|
| 12 |
\item{ignore0}{logical (FALSE). If TRUE, will ignore the 0's in the vector} |
| 13 |
|
| 14 |
\item{...}{not used} |
| 15 |
} |
| 16 |
\value{ |
| 17 |
an integer vector with the number of unique values |
| 18 |
as the number of uniques in the original vector. |
| 19 |
And the values are ranked from 1 (in the beginning of the vector) |
| 20 |
to the number of unique clusters. |
| 21 |
} |
| 22 |
\description{ |
| 23 |
Rank a vector based on clusters |
| 24 |
} |
| 25 |
\examples{ |
| 26 |
|
| 27 |
rank_values_with_clusters(c(1, 2, 3)) |
| 28 |
rank_values_with_clusters(c(1, 1, 3)) |
| 29 |
rank_values_with_clusters(c(0.1, 0.1, 3000)) |
| 30 |
rank_values_with_clusters(c(3, 1, 2)) |
| 31 |
rank_values_with_clusters(c(1, 3, 3, 3, 3, 3, 3, 4, 2, 2)) |
| 32 |
|
| 33 |
rank_values_with_clusters(c(3, 1, 2), ignore0 = TRUE) |
| 34 |
rank_values_with_clusters(c(3, 1, 2), ignore0 = FALSE) |
| 35 |
rank_values_with_clusters(c(3, 1, 0, 2), ignore0 = TRUE) |
| 36 |
rank_values_with_clusters(c(3, 1, 0, 2), ignore0 = FALSE) |
| 37 |
} |