two2one_tailed: Convert 2-tailed into 1-tailed p-values

View source: R/two2one_tailed.R

two2one_tailedR Documentation

Convert 2-tailed into 1-tailed p-values

Description

Convert 2-tailed into 1-tailed p-values, possibly using signs of associated statistics, from a matrix-like object.

Usage

two2one_tailed(
  tab,
  p.cols = "p|PValue",
  stat.cols = "logFC|slope|cor|rho|Direction",
  alternative = c("greater", "less", "Up", "Down"),
  nperm = NULL
)

Arguments

tab

Matrix-like object with statistical columns, some containing p-values.

p.cols

Indices or regexp with column names or column names suffix of numeric p-value columns.

stat.cols

Indices or regexp with column names or column names suffix with numeric signed statistics, or with "Up", "Down" values.

alternative

Direction of change: either "greater" or "less", or their synonyms "Up" or "Down".

nperm

Number of rotations used to estimate the p-values from roast, or number of permutations, where p-value calculated according to Phipson & Smyth (2010). Ignored if NULL.

Value

matrix of p-values.

References

Phipson & Smyth (2010). Permutation P-values Should Never Be Zero: Calculating Exact P-values When Permutations Are Randomly Drawn. Statistical Applications in Genetics and Molecular Biology, 9(1).


jdreyf/ezlimma documentation built on March 3, 2024, 4:23 a.m.