zpvalue.Rd
This function formats a p-value for display, rounding it to three decimal places. If the p-value is smaller than 0.001, it returns '<0.001'.
zpvalue(x)
A character string. If x > 0.001
, it returns the p-value rounded to three decimal places. If x <= 0.001
, it returns '<0.001'.
# Example usage of the function:
zpvalue(0.005)
#> [1] "0.005"
zpvalue(0.0005)
#> [1] "<0.001"