This function gives the profile plot for contingency table objects created by table or xtabs or matrix.

plot_prof(
  x,
  Row = TRUE,
  cex.names = 0.5,
  xlab = "",
  ylab = "Frequency",
  cex = 1,
  ...
)

Arguments

x

a table, xtabs or matrix object.

Row

a logical value to indicate if profile plot is for Rows o Columns.

cex.names

Expansion factor for axis names (bar labels).

xlab

a label for the x axis.

ylab

a label for the y axis, by default is Frequency.

cex

a character expansion factor for legend.

...

arguments to be passed to methods, such as graphical parameters (see par).

Value

plot_prof function returns a profile plot.

Examples

if (FALSE) {
# Using a table object
tbl1 <- with(Cars93, table(Type, AirBags))
plot_prof(x=tbl1, Row=TRUE)
plot_prof(x=tbl1, Row=FALSE, cex.names=0.9, cex=0.6)

# Using a xtabs object
tbl2 <- with(Cars93, xtabs(~ Type + AirBags))
plot_prof(x=tbl2, Row=TRUE, cex.names=1.8)
}