Merge branch 'fix-check' into develop
This commit is contained in:
commit
b5c70ac555
2 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
Package: rBAPS
|
||||
Title: Bayesian Analysis of Population Structure
|
||||
Version: 0.0.0.9016
|
||||
Version: 0.0.0.9017
|
||||
Date: 2020-11-09
|
||||
Authors@R:
|
||||
c(
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ getPopDistancesByKL <- function(adjprior) {
|
|||
for (pop2 in (pop1 + 1):npops) {
|
||||
dist1 <- d[, , pop1]
|
||||
dist2 <- d[, , pop2]
|
||||
div12 <- sum(sum(dist1 * log2((dist1 + 10^-10) / (dist2 + 10^-10)))) /
|
||||
div12 <- sum(sum(dist1 * base::log2((dist1 + 10^-10) / (dist2 + 10^-10)))) /
|
||||
nloci
|
||||
div21 <- sum(sum(dist2 * log2((dist2 + 10^-10) / (dist1 + 10^-10)))) /
|
||||
div21 <- sum(sum(dist2 * base::log2((dist2 + 10^-10) / (dist1 + 10^-10)))) /
|
||||
nloci
|
||||
div <- (div12 + div21) / 2
|
||||
distances[pointer] <- div
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue