count_decimals | R Documentation |
Examine an number and return the number of decimals present.
count_decimals(x)
x |
a vector of numeric values. |
Uses conversions from a numeric to character to splice off and count how many decimals are provided. Supports vectorization.
Length of each values decimal places.
testing <- c(0, 100, 100.1, 101.10101, 100.00)
count_decimals(testing)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.