Description Usage Arguments Examples
This function box plot similar to ggplot2 function modified from https://github.com/zonination/perceptions/blob/master/percept.R)
1 2 3 4 5 |
x |
A data frame or matrix showing with cross tabled format, |
horizontal |
a boolean variable deciding if the box should be horizontal |
outline |
if an outline |
line |
when mar changes, ylab should be changed to by line = 3 |
mar |
margin for plot area |
main |
for title |
names |
group names, can be entered manually |
1 2 3 4 5 6 7 8 9 | set.seed(100)
n <- rnorm(11, 2, 11)
x <- (matrix(rnorm(15*11, 3, 7), nrow=15, ncol=11) *2)
x2 <- sapply(1:11, function(i) x[,i]+n[i])
names <- paste("Var", 1:11, sep =".")
box.plot (x2, horizontal = TRUE, outline = FALSE, lty=1, staplewex=0,
boxwex=0.8, boxlwd=1, medlwd=1,xaxt="n", yaxt="n", notch = FALSE,
mar=c(5,5,3,1), xlab ="Assigned Probability %", ylab = "Phrase",
main = "Perceptions of Probability", names = names)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.