Improved documentation

This commit is contained in:
Waldir Leoncio 2020-02-25 13:53:11 +01:00
parent 1d446fb6d6
commit 8323d54c01
4 changed files with 13 additions and 1 deletions

View file

@ -3,6 +3,7 @@
export(admix1)
export(calculatePopLogml)
export(colon)
export(computeAllFreqs2)
export(computeIndLogml)
export(computePersonalAllFreqs)
export(computeRows)

View file

@ -1,6 +1,10 @@
#' @title Compute all freqs - version 2
#' @description Lisää a priori jokaista alleelia joka populaation joka lokukseen
#' j 1/noalle(j) verran.
#' @param noalle noalle
#' @param COUNTS counts
#' @param SUMCOUNTS sumcounts
#' @export
computeAllFreqs2 <- function (noalle, COUNTS = matrix(NA, 0, 0),
SUMCOUNTS = sum(COUNTS)) {

View file

@ -6,6 +6,13 @@
\usage{
computeAllFreqs2(noalle, COUNTS = matrix(NA, 0, 0), SUMCOUNTS = sum(COUNTS))
}
\arguments{
\item{noalle}{noalle}
\item{COUNTS}{counts}
\item{SUMCOUNTS}{sumcounts}
}
\description{
Lisää a priori jokaista alleelia joka populaation joka lokukseen
j 1/noalle(j) verran.

View file

@ -114,7 +114,7 @@ test_that("computeIndLogml works like on Matlab", {
expect_equivalent(computeIndLogml(1, 0), -Inf)
expect_equivalent(computeIndLogml(0, 0), -Inf)
expect_equivalent(computeIndLogml(-pi, -8), 3.2242, tol = .0001)
expect_equivalent(computeIndLogml(2:3, 2), 2.3026, tol = .0001)
expect_equivalent(computeIndLogml(2:3, 2), 2.3026, tol = .0001)
expect_equivalent(computeIndLogml(matrix(8:5, 2), 100), 14.316, tol = .001)
expect_equivalent(
object = computeIndLogml(matrix(8:5, 2), matrix(c(1, 3), 1)),