Description Usage Arguments Value Examples
twowaybox provides black and white publication quality box plots for a 1 or 2-way design
1 2 |
data |
data.frame containing all data |
group1 |
name of grouping variable 1 |
group2 |
name of grouping variable 2 |
y |
name of y |
ylim |
y limits |
main |
Main title of plot |
labflip |
If TRUE, group 2 labels will be flipped 90 degrees |
base graph figure
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #test.data<-function(){ #
# factor2<-rbinom(100,1,.5) #
# factor21<-rbinom(100,1,.5) #
# factor3<-sample(c('Male','Female','Other'),100,replace=TRUE) #
# factor31<-sample(c('Catholic','Christian','Atheist'),100,replace=TRUE) #
# factor4<-rep(1:4,25) #
# factor41<-sample(c('U.S.','Australia','UK','Canada'),100,replace=TRUE) #
# factor5<-rep(1:5,20) #
# factor51<-sample(c('Caucasian','Af.Amer','Asian Am.','Latin Am.', #
# 'Canadian'),100,replace=TRUE) #
# y<-rnorm(100,53,19) #
# tester<-data.frame(factor2,factor21,factor3,factor31,factor4,factor41, #
# factor5,factor51,y) #
# return(tester) #
#} #
#okaydata <- test.data() #
#twowaybox(labflip=FALSE,data=okaydata,group1=factor5,group2=factor2,y=y)
#twowaybox(labflip=FALSE,data=okaydata,group1=factor5,y=y)
#twowaybox(labflip=FALSE,data=okaydata,group1=factor3,y=y)
#twowaybox(labflip=FALSE,data=okaydata,group1=factor2,y=y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.