View source: R/specific_calculations.R
triangle_num | R Documentation |
nth Triangle Number (like factorial but with addition)
triangle_num(nums, coerce = round, ...)
nums |
(Numeric) A vector of numbers. |
coerce |
(Name/Symbol) The name of a function that will be used to coerce
|
... |
(dots) Extra arguments sent to the function named in |
A Numeric vector where each element is the nth triangle number of the original element.
Desi Quintans (http://www.desiquintans.com)
https://math.stackexchange.com/a/60581
triangle_num(1:10)
#> [1] 1 3 6 10 15 21 28 36 45 55
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.