discrete_pvalue: Convert continuous p-values into a factor based on the given...

Description Usage Arguments Value Examples

Description

Convert continuous p-values into a factor based on the given split.

Usage

1
discrete_pvalue(p.value, split_by = c(0.001, 0.01, 0.05))

Arguments

p.value

Vector of p-values.

split_by

Where to split the p-values up by. Default is the <0.001, <0.01, <0.05, and all others are >0.05.

Value

A factor vector of p-value splits.

Examples

1
2
3
4
5
6
pvals <- c(0.001, 0.0123, 0.123, 0.009, 0.2145, 0.987, 0.05, 0.049, 0.051)
discrete_pvalue(pvals)
discrete_pvalue(pvals, split_by = c(0.05))
discrete_pvalue(pvals, split_by = c(0.01))
discrete_pvalue(pvals, split_by = c(0.01, 0.05))
discrete_pvalue(pvals, split_by = c(0.05, 0.001, 0.01))

lwjohnst86/ggepi documentation built on May 13, 2019, 3:07 a.m.