format_p_val: Format p-value with a specified significant digit cutoff

Description Usage Arguments Value

View source: R/format_p_val.R

Description

Takes a set of p-values, rounds to the specified significant digits, and convert values that are less than the specified cutoff to "<'cutoff'". Maintains consistent numbers of significant digits.

Usage

1
2
format_p_val(x, digits = 3, cutoff_action = "inequality",
  format_sci = NULL)

Arguments

x

A vector of p-values

digits

how many significant digits are to be used.

cutoff_action

Determines the behavior of the function for values that are less than the specified number of digits. If set to "inequality", then the function replaces these values with "<cutoff". If set to "sci", then the values are converted to scientific notation.

format_sci

A string with which to replace the standard "e" scientific notation.

Value

A vector of formatted p-values.


graggsd/sgcleanup documentation built on May 28, 2019, 8:53 p.m.