boxplot_nEle: Box plot and number

Description Usage Arguments Author(s) See Also Examples

View source: R/copies_from_Useful4me.R

Description

Make a box-and-whisker plot with showing the number of elements in each group If Y-axis is in log-scale, outliers are determined after log-transformation, unlike boxplot.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
boxplot_nEle(
  formula,
  data,
  ...,
  subset,
  na.action,
  test = c("kruskal.test", "aov", "t.test"),
  test_txt_par = list(),
  nEle_txt_par = list()
)

Arguments

formula, data, subset, na.action

same as those for boxplot

...

arguments to be passed to boxplot

test

the test to check the difference between groups. If this is NULL or "", no test will be performed.

test_txt_par

a list of parameters to control on displaying the test result. refer to text. In here, x can be "center", "right", or numerical vectors as x of text. The default is x = "center", y= par("usr")[4], labels = 'pval', adj = c(0.5, 1.5), col = "navy", cex = 0.8).

nEle_txt_par

a parameter list for displaying the number of elements of each group. The default is list(x = seq_along(nEle), y = par("usr")[3], labels = nEle, col = "brown", cex = 0.8, pos = 3).

Author(s)

Mun-Gwan Hong, mun-gwan.hong@scilifelab.se

See Also

boxplot

Examples

1
2
data <- data.frame("y"= rnorm(20), "x"= gl(2, 10))
boxplot_nEle(y ~ x, data, test= "t.test", test_txt_par= list("col"= "blue"))

Rundmus/BAf-R_package documentation built on May 18, 2020, 12:59 p.m.