| lpvalue2 | R Documentation |
Formats p-values specifically for display in plots (e.g., survival curves). Returns formatted string with "p = " or "p < " prefix.
lpvalue2(x, digits)
x |
Numeric p-value |
digits |
Number of decimal places to display (default from context) |
Formatting rules:
p < 10^-digits: returns "p < threshold" (e.g., "p < 0.001")
p >= threshold: returns "p = value" rounded to specified digits
Used by: ggkmcif2() for survival curve annotations in main.R and ggkmcif3.R
Character string with "p = " or "p < " prefix
## Not run:
lpvalue2(0.0001, 3) # Returns: "p < 0.001"
lpvalue2(0.0456, 3) # Returns: "p = 0.046"
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.