Last chance! 50% off unlimited learning
Sale ends in
Calculate digit sum of a number x.
DigitSum(x)
an integer number
the digit sum
URL: https://stackoverflow.com/questions/18675285/digit-sum-function-in-r
# NOT RUN {
DigitSum(c(124, 45, 268))
# [1] 7 9 16
# }
Run the code above in your browser using DataLab