DigitSum {DescTools} | R Documentation |
Calculate Digit Sum
Description
Calculate digit sum of a number x.
Usage
DigitSum(x)
Arguments
x |
an integer number |
Value
the digit sum
Author(s)
Andri Signorell <andri@signorell.net> based on code by Julius benchmarked by Uwe
References
URL: https://stackoverflow.com/questions/18675285/digit-sum-function-in-r
See Also
Examples
DigitSum(c(124, 45, 268))
# [1] 7 9 16
[Package DescTools version 0.99.55 Index]