Learn R Programming

CorReg (version 1.1.1)

BoxPlot: Matplot with curves comparison by background colors.

Description

Plot the columns of one matrix against the columns of another, with conditionnal background for easier comparison of curves.

Usage

BoxPlot(num, grp, data = NULL, AnoVa = TRUE, risk = 0.05, lang = c("en,fr"), ...)

Arguments

num
a numeric vector to plot boxplot(num~grp). Represents the value that will be compared between the groups.
grp
a qualitative vector (factor) to plot boxplot(num~grp). Represents the groups we will compare.
data
a data.frame (or list) from which the variables in formula should be taken.
AnoVa
boolean to compute or not anova (when multiple groups) to see if they differ in mean.
risk
the risk value used for confidence intervals
lang
lingustic parameter to specify the language of the legend
...
Other graphical parameters

Examples

Run this code
    ## Not run: 
# require(CorReg)
# repart=c(20,40,40)
# X=data.frame(num=c(rnorm(repart[1],10,1),rnorm(repart[2],11,1),rnorm(repart[3],10,1)),
# grp=c(rep("A",times=repart[1]),rep("B",times=repart[2]),rep("C",times=repart[3])))
# 
# 
# BoxPlot(X$num,X$grp,data=X,ylab="num",main="boxplot with confidence intervals")
# #Confidence interval in red with mean in blue.
# 
# ## End(Not run)

Run the code above in your browser using DataLab