DigitSum | R Documentation |
Calculate digit sum of a number x.
DigitSum(x)
x |
an integer number |
the digit sum
Andri Signorell <andri@signorell.net> based on code by Julius benchmarked by Uwe
URL: https://stackoverflow.com/questions/18675285/digit-sum-function-in-r
IsPrime
DigitSum(c(124, 45, 268))
# [1] 7 9 16
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.