Plot a barplot of a count variable avoiding left-out bars at zero counts in [min; MAX] A frequency table including zeros is returned invisibly. There are three options: Frequency, Proportion, and Percent on y-axis.

CountBarplot(COUNTS, TYPE = "Frequency", MAIN = "Barplot of",
  XLAB = "Counts", YLAB = NULL, COL = 4)

Arguments

COUNTS

is a prepared data matrix with cumulative frequencies of ORDLEVELS and COURSLABEL

TYPE

="Frequency other options for y-axis: "Proportion" and "Percent

MAIN

="Barplot of" is default. If left as default name of variable COUNTS is appended automatically.

XLAB

Label on x-axis set to "Counts" by default

YLAB

=NULL y-axis label. Set to TYPE if left NULL. ( Nvalid = xxx ) appended automatically

COL

=4 Colour of bars, default = 4 (blue).

Value

Invisible return of the count variable as ordered factor with non observed counts intercalated. Side-effect: generates a barplot.

Examples

if (FALSE) { Counts<-sample(1:28,52,replace=T) CountBarplot(Counts) Counts[3]<-NA CountBarplot(Counts,TYPE="Proportion",YLAB="Hallo World") Countsfactor<-CountBarplot(Counts,TYPE="Percent",COL=2) Countsfactor }