Barplot2WayTable {catdap} | R Documentation |
Bar Plots for Two-Way Tables
Description
Create bar plots for output two-way tables of catdap1() or catdap2().
Usage
Barplot2WayTable(x, exvar = NULL, gray.shade = FALSE)
Arguments
x |
an output object of |
exvar |
names of the explanatory variables. Default is all variables
except |
gray.shade |
A logical value indicating whether the gamma-corrected grey
palette should be used. If |
Details
For continuous variables, we assume that
b_1, b_2, \dots, b_{m+1}
are boundary values
of m
bins. Output value ranges r_i
(1 \le i \le m)
are
defined as follows :
r_i = \left[ \; b_i,\; b_{i+1}\; \right. ) \;\; \mathrm{for} \;1 \le i < m,
r_m = \left[ \; b_m,\; b_{m+1}\; \right] .
Examples
# catdap1c (Titanic data)
resvar <- "Survived"
z1 <- catdap1c(Titanic, resvar)
Barplot2WayTable(z1)
# catdap2 (Edgar Anderson's Iris Data)
# "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species"
data(iris)
resvar <- "Petal.Width"
z2 <- catdap2(iris, c(0, 0, 0, -7, 2), resvar, c(0.1, 0.1, 0.1, 0.1, 0))
exvar <- c("Sepal.Length", "Petal.Length")
Barplot2WayTable(z2, exvar)
[Package catdap version 1.3.7 Index]