Creates a bar graph of the cumulative maximum CTC GRADE 0:5 in the course of chemotherapy cycles. The ORDLEVELS parameter can be used to select another ordinal variable. The COURSELABEL parameter defines the course variable. The maximum number of bars of the course variable is 16. A frequency table is displayed on the right.

PlotOrdinalCourse(proztab, COL = c(0, 7, 3, 4, 6, 2),
  XLAB = "cumulative maximum CTC grade",
  MAIN = "Barplot course of ordinal", ORDLEVELS = "CTC",
  COURSELABEL = "CY", SHOW_TABLE = TRUE)

Arguments

proztab

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

COL

Colour of Subgroups, default = c(0,7, 3, 4, 6, 2) works for CTC0:4 and CTC 0:5, but can be adjusted

XLAB

="cumulative maximum CTC grade" is default and can be adjusted

MAIN

="Barplot course of ordinal" is default and can be adjusted

ORDLEVELS

="CTC" is default and can be adjusted

COURSELABEL

="CY" is default and can be adjusted

SHOW_TABLE

= TRUE logical switch to supress the table

Value

Generates a stacked barplot with a frequency table.

Examples

if (FALSE) { # Simulate CTC 0:4 data tt<-list( factor(sample(0:4,101,replace=T, prob=c(.2, .3, .4, .08, .02)),levels=paste(0:4)), factor(sample(0:4,101,replace=T, prob=c(.1, .2, .5, .1, .1)),levels=paste(0:4)), factor(sample(0:4,100,replace=T, prob=c(.1, .15, .4, .2, .15)),levels=paste(0:4)), factor(sample(0:4,99,replace=T, prob=c(.05, .12, .38, .25, .2)),levels=paste(0:4)), factor(sample(0:4,100,replace=T, prob=c(.1, .15,.4,.2,.15)),levels=paste(0:4)), factor(sample(0:4,99,replace=T, prob=c(.05, .12,.38,.25,.2)),levels=paste(0:4))) # Percent Table ttt<-prop.table(sapply(tt,function(x){table(x)}),2)*100 colnames(ttt)<-paste("CY",1:length(tt),sep="-") PlotOrdinalCourse(ttt) PlotOrdinalCourse(ttt,SHOW_TABLE = F) # Simulate CTC 0:5 data tt<-list( factor(sample(0:5,101,replace=T, prob=c(.2, .3, .4, .08, .02, .01)),levels=paste(0:5)), factor(sample(0:5,101,replace=T, prob=c(.1, .2, .5, .1, .1, .01)),levels=paste(0:5)), factor(sample(0:5,100,replace=T, prob=c(.1, .15, .4, .2, .15, .01)),levels=paste(0:5)), factor(sample(0:5,99,replace=T, prob=c(.05, .12, .38, .25, .2, .01)),levels=paste(0:5)), factor(sample(0:5,100,replace=T, prob=c(.1, .15,.4,.2,.15,.01)),levels=paste(0:5)), factor(sample(0:5,99,replace=T, prob=c(.05, .12,.38,.25,.2,.05)),levels=paste(0:5))) # Percent Table ttt<-prop.table(sapply(tt,function(x){table(x)}),2)*100 colnames(ttt)<-paste("CY",1:length(tt),sep="-") PlotOrdinalCourse(ttt) }