sum_g: Sum of the higher terms of a list

View source: R/11-grafos-NPdif.R

sum_gR Documentation

Sum of the higher terms of a list

Description

Sum of the higher terms of a list

Usage

sum_g(L, m)

Arguments

L

A numeric sequence

m

A scalar

Details

It sorts the list L in decreasing order and returns the sum of the first m components of the ordered list.

Value

The sum of the m higher terms of the list L

Author(s)

Cesar Asensio

Examples

sum_g(1:10, 3)  # 8 + 9 + 10 = 27


gor documentation built on May 4, 2023, 1:06 a.m.

Related to sum_g in gor...