Description Usage Arguments Details Examples
View source: R/lipidome_comparison_clustering.R
'hclust_heatmap_interactive' takes a data frame and lets you open an interactive heatmap in the viewer or save the heatmap to png.
1 2 3 4 5 6 7 8 9 | hclust_heatmap_interactive(
input_df,
row_names = rownames(input_df),
col_names = colnames(dplyr::select_if(input_df, is.numeric)),
dist_method = "euclidean",
hclust_method = "complete",
title = "Hierarchical clustering",
out_path = "none"
)
|
input_df |
data frame. |
row_names |
data frame. Default are the row names of the input data frame. |
col_names |
data frame. Default are the column names of the input data frame. |
dist_method |
string. Method for the dist() function. dist_method = c("euclidean", "manhattan"). Default = "euclidean". |
hclust_method |
string. Method for the hclust() function. hclust_method = c("complete", "single", "average"). Default = "complete". |
title |
string. Plot title. Default = "Hierarchical clustering". |
out_path |
string. Path to save plot to png. |
This finction takes a data frame (optionally numeric or numeric with additional non-numeic varibles). Non-numeric variables are not part of the heatmap, but displayed in a separate box where the levels are color coded. The used method to create the heatmap is hierarchical clustering. Dendrograms are displayed for bowth rows and columns.
1 2 3 4 5 6 7 8 9 | hclust_heatmap_interactive(iris, iris$Species)
hclust_heatmap_interactive(USArrests,
col_names = c("M", "A", "UP", "R"),
row_names = 1:50,
title = "Heatmap of USArrests")
## Not run:
dir <- "examples/USArrests"
hclust_heatmap_interactive(USArrests, out_path = dir)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.