kullback: Calculate Kullback-Leibler divergence between two probability...

View source: R/abundance.R

kullbackR Documentation

Calculate Kullback-Leibler divergence between two probability distributions

Description

Undefined if zero counts/proportions

Usage

kullback(x, y, base = 2, standardize = TRUE)

Arguments

x

Vector of counts or proportions of N elements

y

Second vector of counts or proportions of N elements

base

Base of logarithm

standardize

If TRUE divide x and y by sum(x) and sum(y)

Value

Kullback-Leibler divergence

Examples

kullback(1:3,3:1)

sherrillmix/dnar documentation built on July 18, 2022, 10:07 p.m.