knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
You probably shouldn't use this unless you need to replicate something done in Excel.
devtools::install_github("mps9506/ExcelRound")
# IEEE / IEC rounding: -2 0 0 2 2 4 4 round(.5 + -2:4)
library(ExcelRound) ## Expect -2 -1 1 2 3 4 5 xl_round(.5 + -2:4)
knitr::include_graphics("man/figures/README-fig1.png")
Note that this function adds a very small amount to x
which scales with the number of digits to the left of the decimal point. It is possible that rounding might be incorrect above 1E15 or 1E-15. See https://stackoverflow.com/a/59933065/4488436 for details.
devtools::test(reporter = "summary")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.