View source: R/11-grafos-NPdif.R
sum_g | R Documentation |
Sum of the higher terms of a list
sum_g(L, m)
L |
A numeric sequence |
m |
A scalar |
It sorts the list L in decreasing order and returns the sum of the first m components of the ordered list.
The sum of the m higher terms of the list L
Cesar Asensio
sum_g(1:10, 3) # 8 + 9 + 10 = 27
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.