plot_prof: Profile plot

View source: R/plot_prof.R

plot_profR Documentation

Profile plot

Description

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

Usage

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

## Not run: 
# 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)

## End(Not run)

fhernanb/model documentation built on March 3, 2024, 12:15 p.m.