decimal_place = function(x, k = 4, value = FALSE, dec = ",")
{
cd = function(x, k)
{
s = sign(x)
x = abs(x)
nn = 1/10^k
nk = paste0("<", format(nn, scientific=FALSE, decimal.mark = dec))
if(is.na(x))
{
x = ""
#} else if(x == 0) {
# x = "0"
} else if(x >= nn | x == 0) {
x = x * s
format(round(x, k), nsmall = k, decimal.mark = dec, scientific = FALSE)
} else nk #end if
}#end function cd
## numero total
nt = function(x) x
if(value) out = sapply(round(x, k), nt) else out = sapply(x, cd, k = k)
return(out)
}#end function casa_decimal
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.