This is not an issue with accouting function, it is more a matter of order of operation in the pipe. as.integer()/100 is not a correct pipe step. You need to correctly isolate it using a function define before or using dot anonymous function, so that accounting applies correctly on the result of this.
There are also special pipe-friendly operation in magrittr for this kind of issue.
library(magrittr)
library(formattable)
accounting("39990" %>% as.integer()/100)
#> [1] 399.90
# Taking care of pipe operation precedence
"39990" %>% {as.integer(.)/100} %>% accounting()
#> [1] 399.90
# using special pipe operation from magrittr
"39990" %>% as.integer() %>% magrittr::divide_by(100) %>% accounting()
#> [1] 399.90
I find you both answer this question on the community and Stack Overflow.
For Policy in FAQ, I delete the same question on Stack Overflow. Thanks for the reminder.