Re: [R] Brillouin index

2012-01-13 Thread Ben Bolker
MacQueen, Don llnl.gov> writes: > > It's a pretty simple formula, according to the sources I found. > > Here's a function that looks right to me, but I have no independent > calculation with which to check it. > (no guarantees!) > > Hb <- function(ns) { > N <- sum(ns) > (lfactorial(N) - su

Re: [R] Brillouin index

2012-01-13 Thread MacQueen, Don
It's a pretty simple formula, according to the sources I found. Here's a function that looks right to me, but I have no independent calculation with which to check it. (no guarantees!) Hb <- function(ns) { N <- sum(ns) (lfactorial(N) - sum(lfactorial(ns)))/N } > ns <- c(3,5,2,8) > Hb(ns) [1]

[R] Brillouin index

2012-01-13 Thread Philipp Fischer
Dear colleagues. I wonder if anybody knows about a procedure in R to calculate the Brillouin Diversity index. I searched the net but did not find anything about it. Thanks a lot for any help Best, Philipp *** Prof. Dr. Philipp Fischer Head of A