Description Usage Arguments Examples
Function to make many scatterplots, boxplots and mosaic plots as necessary for exploratory analyses. Includes the Spearman correlation coefficient and sample size in the plot title. Correlation coefficients for plots with any categorical variables are calculated after converting the factors to numeric. The titles are printed in red if the correlation is significant. Significance is tested by the method appropriate to the variable: scatterplots use Spearman's test, boxplots use Kruskal-Wallis and mosaics use Chi-Square test.
1 2 3 |
yname |
name of variable from tdat to plot on y-axis |
xname |
name of variable from tdat to plot on x-axis |
long.yname |
character string to be put on y-axis |
long.xname |
character string to be put on x-axis |
showr |
TRUE means include correlation and n on plot heading |
use.pch |
pch symbol to be used in plot |
use.cex |
cex (character expansion) for plotting symbols |
jitx |
factor component of jitter(x,factor=jitx) |
jity |
factor component of jitter(y,factor=jity) |
addtomain |
additional text for main title (if showr=FALSE, this is the entire title) |
cex.xylab |
cex for x and y axes |
cex.title |
cex for title (and correlation, if shown) |
... |
Other graphical parameters sent to plot |
1 2 3 4 5 | test.dat<-data.frame(x=rnorm(10),y=rbinom(10,2,.5))
scatter.box.mosaic.plot(test.dat,yname="y",xname="x")
test.dat<-data.frame(x=1:10+rnorm(10),y=as.factor(c(rep(1,5),rep(0,5))))
scatter.box.mosaic.plot(test.dat,yname="y",xname="x")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.