PomaClust | R Documentation |
PomaClust
performs a k-means clustering and plots the results in a classical multidimensional scaling (MDS) plot.
PomaClust(
data,
method = "euclidean",
k = NA,
k_max = floor(min(dim(data))/2),
show_clusters = TRUE,
labels = FALSE
)
data |
A |
method |
Character. Indicates the distance method to perform MDS. Options are "euclidean", "maximum", "manhattan", "canberra" and "minkowski". See |
k |
Numeric. Indicates the number of clusters (default is |
k_max |
Numeric. Indicates the number of clusters among which the optimal |
show_clusters |
Logical. Indicates if clusters should be plotted or not. |
labels |
Logical. Indicates if sample names should be plotted or not. |
A list
with results including plots and tables.
Pol Castellano-Escuder
## Output is a list with objects `mds_coordinates` (tibble), `mds_plot` (ggplot2 object), `optimal_clusters_number` (numeric value), `optimal_clusters_number` (numeric value), and `optimal_clusters_plot` (ggplot2 object)
data <- POMA::st000284 # Example SummarizedExperiment object included in POMA
data %>%
PomaClust(method = "euclidean",
k = NA,
k_max = floor(min(dim(data))/2),
show_clusters = TRUE,
labels = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.