Description Usage Arguments Value References Examples
Rounds a numeric vector to arbitrary values (not just decimal values as with round). E.g. allows you to round to nearest 0.3 instead of just nearest 1 or 0.1
1 2 3 | roundnear(vec, roundvec)
round_sigfig(vec, digits = 2)
|
vec |
numeric vector |
roundvec |
What value to round things to (e.g. nearest 1, 10, 0.3, etc.). Typically a single item to apply to all of vec. If of length greater than 1, usual wrapping rules apply. |
digits |
Number of significant digits to round to |
Rounded numeric vector of length length(vec)
http://en.wikipedia.org/wiki/Significant_figures
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.