txtRound: A Rounding Function This function rounds a number and returns...

Usage Arguments Examples

View source: R/txtRound.R

Usage

1
txtRound(x, digits = 3, html = T, pt = F, sci = F)

Arguments

html

breaks and special characters given in html (default TRUE).

p

adds in a 'p' before number (default FALSE)

Examples

1
2
3
4
5
6
7
8
txtRound(c(0.002, 2.3049))
## [1] "0.002" "2.305"

txtRound(c(0.000002, 2.3049), p=T)
## [1] "p < 0.001" "p = 2.305" 

txtRound(c(0.000002, 2.3049), p=T, html=F)
## [1] "p < 0.001" "p = 2.305"

jachan1/repFxns documentation built on July 20, 2021, 10:51 p.m.