Description Usage Arguments Details Value See Also Examples
A wrapper of round_any
to round data sets to multiple of any number.
1 | quickround(x, accuracy)
|
x |
a |
accuracy |
number to round to; for POSIXct objects, a number of seconds |
The x
may contain non numerical varibles (factor, character, logical). They will remain unchanged. The numerical or time variables will be rounded to a multiple fo the accuracy.
If accuracy
is of length 1, then this value is applied to all the columns of the data set. Otherwise, its length must be the same as the number of columns of x
, including non numerical variables. If any value if NA
, the corresponding variable will remain unchanged.
A tbl
object.
1 2 3 4 5 6 7 | quickround(iris,0.2)
quickround(iris[,1:3],c(0.2,0.5,1.0))
tfq <- tablefreq(iris, vars=c("Sepal.Length","Species"))
a <- quickround(tfq, c(0.3, NA, NA))
b <- tablefreq(a, freq="freq")
b
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.