ggstatsplot (version 0.0.4)

specify_decimal_p: Custom function for getting specified number of decimal places in results for p-value

Description

Function to format an R object for pretty printing with a specified (k) number of decimal places. The function also allows highly significant p-values to be denoted as "p < 0.001" rather than "p = 0.000".

Usage

specify_decimal_p(x, k = 3, p.value = FALSE)

Arguments

x

A numeric variable.

k

Number of digits after decimal point (should be an integer) (Default: k = 3).

p.value

Decides whether the number is a p-value (Default: FALSE).

Value

Formatted numeric values.