Returns the sum of the values of the elements of a list x.

sum_of(x)

Arguments

x

List

Details

If there is a tie, and equal_is_random is TRUE, the index of one of the tied maxima is returned at random. Otherwise, the value with the lowest index is returned.

Examples

theta = list(par_one = list(1,2,3), par_two = list(2,3,4)) sum_of(theta$par_one)
#> [1] 6