plot_prof: Profile plot

Description Usage Arguments Value Examples

View source: R/plot_prof.R

Description

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

Usage

1
2
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

Character expansion factor for legend.

Value

plot_prof function returns a profile plot.

Examples

1
2
3
4
5
6
7
8
9
require(MASS)
# 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)

fhernanb/model documentation built on Sept. 16, 2017, 11 a.m.