table2barplot: draw barplot, from a data.frame generated by table(para1,...

View source: R/seurat_related.R

table2barplotR Documentation

draw barplot, from a data.frame generated by table(para1, para2), colored by 1st parameter of table()

Description

v2.1 v2.2 第一参数的空值跳过

Usage

table2barplot(
  tbl1,
  colors = NULL,
  levels = NULL,
  scale = T,
  title = "",
  omit = NULL,
  xlab = "",
  ylab = "",
  legendTitle = NULL
)

Arguments

tbl1

data.frame, draw by each column

colors

colors of each row(default NULL, auto-color)

scale

whether scale to 1 or not(default T)

title

the main title of the figure,(is main in the function)

omit

whether to omit some columns

legendY

the position y of legend, adjust as needed, default -0.25

...

Examples

table2barplot(table(sce$seurat_clusters, sce$sample) )

DawnEve/GEB documentation built on July 6, 2022, 7:05 p.m.