Skip to content

Nelson-Gon/umart

Repository files navigation

umart generates umap art

CRAN_Status_Badge CRAN_Release_Badge Codecov test coverage R-CMD-check test-coverage Project Status lifecycle license GitHub last commit GitHub issues GitHub issues-closed PRs Welcome Maintenance

Installation

devtools::install_github("Nelson-Gon/umart")

Load library

library(umart)
## Loading required package: ggplot2

Data Generation

r_x <- generate_data(mean = 20.5, sd = 0.2)
r_y <- generate_data(mean = 10.5, sd = 0.1)
df <- data.frame(x = r_x, y=r_y, group = rep(paste0("grp_", 1:5), 10))

Run UMAP

umap_df <- run_umap(df[, -3],neighbors = 5,  seed = 520)

Generate umart

generate_umart(umap_df, group_col = df$group,
               bg_color = "#f2f5f3", use_geom = "geom_segment",
               xend = 0.5, yend = 12)

Many neighbors

umaps <- run_umap(df[, -3],neighbors = 2:5, seed = 20)
groups <- rep(paste0("g_", 1:5), 40)

generate_umart(umaps, group_col = groups, opacity = 0.15,
               bg_color = "#f6feff", use_geom = "geom_col",
               use_palette = "Blues"
               ) 


Please note that the umart project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

For further exploration, please browseVignettes("umart").

To raise an issue, please do so here

Thank you, feedback is always welcome :)