sum_g {gor}R 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


[Package gor version 1.0 Index]