Using fmsb to calculate incidence rate ratios.
Example:
rr <- rateratio(853, 7703, 284, 3508)
rr
Cases Person-time
Exposed 853 284
Unexposed 7703 3508
Total 8556 3792
Incidence rate ratio estimate and its significance probability
data: 853 7703 284 3508
p-value <2.2e-16
95 percent confidence interval:<br/>
1.274426 1.468068
sample estimates:
[1] 1.367824
Then when I try to return the values to store later in a table:
p <- rr$p.value
p
[1] 0
How can I change the format so that it returns the p-value with more digits? Preferably 3 or 4 or in scientific notation.