library(Seurat)
# Create example groups
pbmc_small$sample_id <- sample(c("sample1", "sample2"), size = ncol(pbmc_small), replace = TRUE)
# Plot
Plot_Median_Genes(seurat_object = pbmc_small, sample_col = "orig.ident", group_by = "sample_id")
Run the code above in your browser using DataLab