opts = options(OutDec = ",")
as.character(1.234) # using ',' as the decimal separator
print(1.234) # same
xfun::decimal_dot(as.character(1.234)) # using dot
xfun::decimal_dot(print(1.234)) # using dot
options(opts)
Run the code above in your browser using DataLab