Learn R Programming

micompr (version 1.1.4)

pvalf.default: Default p-value formatting method

Description

Format a p-value for printing in a LaTeX table. Requires the ulem LaTeX package for underlining the p-values.

Usage

# S3 method for default
pvalf(pval, params = list())

Value

A string representing the formatted pval.

Arguments

pval

Numeric value between 0 and 1.

params

A list of options. This function accepts the following options:

minval

If p-value is below this value, return this value preceded by a "<" sign instead instead.

lim1val

If p-value is below this value, it will be double-underlined.

lim2val

If p-value is below this value, it will be underlined.

na_str

String to use for NAs. By default NAs are returned as is.

Examples

Run this code
pvalf(0.1)
pvalf(0.000001)
pvalf(c(0.06, 0.04, 0.005, 0.00001), list(minval = 0.0001))

Run the code above in your browser using DataLab