Learn R Programming

aphid (version 1.3.5)

logsum: Sum of logged probabilities.

Description

"logsum" takes a vector of logged probabilities (neagtive values) and returns its sum.

Usage

logsum(x)

Value

returns a single numeric value representing the logged sum of the values in the input vector.

Arguments

x

a numeric vector of logged probabilities.

Author

Shaun Wilkinson

Details

This is a simple compiled function that exponentiates the values in the input vector, finds their sum, and returns the log of that value.