Learn R Programming

DescTools (version 0.99.19)

DigitSum: Calculate Digit Sum

Description

Calculate digit sum of a number x.

Usage

DigitSum(x)

Arguments

x
an integer number

Value

References

URL: http://stackoverflow.com/questions/18675285/digit-sum-function-in-r

See Also

IsPrime

Examples

Run this code
DigitSum(124)

Run the code above in your browser using DataLab