bp3d | R Documentation |
draws the conditioned freuqencies of a categorial variable on two further categorial variables
bp3d(
x,
z,
y,
main = "",
ylab = "frequencies",
xlab = "",
col = heat.colors(length(levels(y)) + 2)[1:length(levels(y))],
space = 0.1,
factor_space = 3,
left_space = 0,
box = T,
boxcol = c("white", "grey"),
legend = TRUE,
locator = "topright"
)
x |
main categorical variable on x-axis |
z |
categorical sub variable on x axis |
y |
dependend categorical variable |
main |
title |
ylab |
y axis label |
xlab |
x axis label |
col |
colors of bar segments |
space |
space between bars within groups |
factor_space |
factor of space between groups |
left_space |
left space of bars |
box |
draw boxes behind goups of x |
boxcol |
color of boxes behind groups |
legend |
draw legend |
locator |
location of legend: "topright", "right" "bottomright" |
x <- sample(paste("time",1:4),240,T)
z <- rep(c("A","B"),each=120)
y <- paste("answer",sample(1:7,240,T))
bp3d(x,z,y,main="bp3d()",xlab="treatment group")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.