After running the following function
count_table <- table(Sample.@meta.data$seurat_clusters, Sample@meta.data$orig.ident, Sample@meta.data$singlr_labels)
View(count_table)
str(count_table)
'table' int [1:15, 1:2, 1:20] 0 0 0 0 0 0 2 0 273 0 ...
- attr(*, "dimnames")=List of 3
..$ : chr [1:15] "0" "1" "2" "3" ...
..$ : chr [1:2] "Sample1" "Sample2"
..$ : chr [1:20] "B_cell" "BM & Prog." "CMP" "DC" ...
I want to create a combined bar plot for that I used the following function but ends with an error.
ggplot(count_table) + geom_bar(aes(x=singlr_labels, fill=orig.ident), position = "dodge") + facet_wrap(~seurat_clusters)