contrast_test: Quick plot + contrast hypothesis test to compare two...

Description Usage Arguments Value Examples

View source: R/contrast_test.R

Description

Quick plot + contrast hypothesis test to compare two populations

Usage

1
2
3
contrast_test(numeric1, numeric2, method = "t.test", title = NULL,
  wantpoints = FALSE, wantviolin = TRUE, colorpair = c("darkorchid4",
  "aquamarine4"))

Arguments

numeric1

a numeric vector of group 1

numeric2

a numeric vector of group 2

method

string, either t.student (parametric) or wilcox.test (nonparametric)

title

string with the name of the plot

wantpoints

Logical FALSE/TRUE to determine whether points will be overplotted

wantviolin

Logical FALSE/TRUE to determine whether you want a violine plot in the background

The

colors of the two groups. Default c("darkorchid4","aquamarine4")

Value

Prints a plot with the given test p-value. If title is provided, it prints into a pdf.

Examples

1
2
3
group1=rnorm(n = 100,mean = 1,sd = 1)
group1=rnorm(n = 100,mean = 2,sd = 1)
thetimenow<-contrast_test(group1,group2)

MoisesExpositoAlonso/moiR documentation built on Dec. 24, 2021, 10:12 p.m.