barplot_for_counts function

Barplot for counts

Barplot for counts

barplot_for_counts(data = NULL, x, y)

Arguments

  • data: a data object (a data frame or a data.table)
  • x: name of the variable that will be on the x axis of the barplot
  • y: name of the variable that will be on the y axis of the barplot

Examples

barplot_for_counts(x = 1:3, y = 7:9) barplot_for_counts(data = data.frame( cyl = names(table(mtcars$cyl)), count = as.vector(table(mtcars$cyl))), x = "cyl", y = "count")