Fixed argument passing (#25)
This commit is contained in:
parent
3d3131b68c
commit
b75d38fee4
2 changed files with 6 additions and 5 deletions
|
|
@ -14,8 +14,9 @@
|
||||||
#' greedyMix(data, "fasta")
|
#' greedyMix(data, "fasta")
|
||||||
greedyMix <- function(
|
greedyMix <- function(
|
||||||
data, format, partitionCompare = NULL, ninds = NULL, rowsFromInd = NULL,
|
data, format, partitionCompare = NULL, ninds = NULL, rowsFromInd = NULL,
|
||||||
noalle = NULL, adjprior = NULL, npops = 1L, priorTerm = NULL,
|
noalle = NULL, adjprior = NULL, npops = 1L, priorTerm = NULL, counts = NULL,
|
||||||
alleleCodes = NULL, inp = NULL, popnames = NULL, fixedK = FALSE, verbose = TRUE
|
sumcounts = NULL, max_iter = 100L, alleleCodes = NULL, inp = NULL,
|
||||||
|
popnames = NULL, fixedK = FALSE, verbose = FALSE
|
||||||
) {
|
) {
|
||||||
# Importing and handling data ================================================
|
# Importing and handling data ================================================
|
||||||
data <- importFile(data, format, verbose)
|
data <- importFile(data, format, verbose)
|
||||||
|
|
@ -39,7 +40,7 @@ greedyMix <- function(
|
||||||
|
|
||||||
|
|
||||||
# Generating partition summary ===============================================
|
# Generating partition summary ===============================================
|
||||||
logml_npops_partitionSummary <- indMixWrapper(c, npops, fixedK, verbose);
|
logml_npops_partitionSummary <- indMixWrapper(c, npops, counts, sumcounts, max_iter, fixedK, verbose);
|
||||||
logml <- logml_npops_partitionSummary[["logml"]]
|
logml <- logml_npops_partitionSummary[["logml"]]
|
||||||
npops <- logml_npops_partitionSummary[["npops"]]
|
npops <- logml_npops_partitionSummary[["npops"]]
|
||||||
partitionSummary <- logml_npops_partitionSummary[["partitionSummary"]]
|
partitionSummary <- logml_npops_partitionSummary[["partitionSummary"]]
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
indMixWrapper <- function(c, npops, fixedK = FALSE, verbose = FALSE) {
|
indMixWrapper <- function(c, npops, counts, sumcounts, max_iter, fixedK = FALSE, verbose = FALSE) {
|
||||||
if (fixedK) {
|
if (fixedK) {
|
||||||
stop("indMix_fixK() not yet implemented.") # TODO: translate indMix_fixK.m
|
stop("indMix_fixK() not yet implemented.") # TODO: translate indMix_fixK.m
|
||||||
} else {
|
} else {
|
||||||
indMix(c, npops, verbose)
|
indMix(c, npops, counts, sumcounts, max_iter, verbose)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue