Learn R Programming

rkeops (version 2.2.2)

xlogx.default: x*log(x) function

Description

Element-wise \(x \times \log(x)\) function on numeric or complex vectors (or objects which can be coerced to them).

Usage

# S3 method for default
xlogx(x)

Value

Vector or array containing the values of x*log(x).

Arguments

x

numeric or complex vectors or objects which can be coerced to such.

Author

Chloe Serre-Combe, Amelie Vernay

Details

See base::Arithmetic and base::log() for details about the multiplication operation and log function.

Note: by convention xlogx(0) returns 0.

See Also

Examples

Run this code
xlogx(4)
xlogx(1:10)

Run the code above in your browser using DataLab