inst/tinytest/test_format_p.R

library(tinytest)

x <- c(.00005, .00009, .0001, .0004, .0005, .0006, .001, .0011, .01, .05)

expect_equal(manymome.table:::format_p(x),
             c("<.001", "<.001", "<.001", "<.001", "<.001",
               "<.001", ".001", ".001", ".010", ".050"))
expect_equal(manymome.table:::format_p(x, .01),
             c("<.010", "<.010", "<.010", "<.010", "<.010",
               "<.010", "<.010", "<.010", ".010", ".050"))
expect_equal(manymome.table:::format_p(x, .0006),
         c("<.0006", "<.0006", "<.0006", "<.0006", "<.0006",
           ".0006", ".0010", ".0011", ".0100", ".0500"))

Try the manymome.table package in your browser

Any scripts or data that you put into this service are public.

manymome.table documentation built on May 29, 2024, 1:38 a.m.