knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Mpformatr is a collection of utilities that help to fulfill reporting and rounding conventions for empirical numbers. These numbers have their own error. This error, e.g., determines the digit which the number is rounded to dynamically. Some functions might not be very complicated, but I was tired of repeating myself.
You can install mpformatr from Github with:
devtools::install_github("tamaracha/mpformatr")
# x is a measurement error x <- 0.174385229 # get order of magnitude of x # This takes 2 significant digits oom(x) # format x accordingly mpformat(x) # format some measured value according to x mpformat(42, oom(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.