Barplot2WayTable | R Documentation |
Create bar plots for output two-way tables of catdap1() or catdap2().
Barplot2WayTable(x, exvar = NULL, gray.shade = FALSE)
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 |
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] .
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.