Removed docs from matlab2r files (#21)
This commit is contained in:
parent
a381fde4bd
commit
69ca345f11
31 changed files with 39 additions and 661 deletions
36
R/indMix.R
36
R/indMix.R
|
|
@ -150,8 +150,8 @@ indMix <- function(c, npops, dispText = TRUE) {
|
|||
diffInCounts <- muutokset_diffInCounts$diffInCounts
|
||||
|
||||
if (round == 1) {
|
||||
maxMuutos <- max_MATLAB(muutokset)$max
|
||||
i2 <- max_MATLAB(muutokset)$idx
|
||||
maxMuutos <- matlab2r::max(muutokset)$max
|
||||
i2 <- matlab2r::max(muutokset)$idx
|
||||
}
|
||||
|
||||
if (i1 != i2 & maxMuutos > 1e-5) {
|
||||
|
|
@ -174,7 +174,7 @@ indMix <- function(c, npops, dispText = TRUE) {
|
|||
partitionSummary <- temp_addToSum$partitionSummary
|
||||
added <- temp_addToSum$added
|
||||
if (added == 1) {
|
||||
temp_minMATLAB <- min_MATLAB(
|
||||
temp_minMATLAB <- matlab2r::min(
|
||||
partitionSummary[, 2]
|
||||
)
|
||||
worstLogml <- temp_minMATLAB$mins
|
||||
|
|
@ -195,8 +195,8 @@ indMix <- function(c, npops, dispText = TRUE) {
|
|||
)
|
||||
muutokset <- muutokset_diffInCounts$muutokset
|
||||
diffInCounts <- muutokset_diffInCounts$diffInCounts
|
||||
isoin <- max_MATLAB(muutokset)[[1]]
|
||||
indeksi <- max_MATLAB(muutokset)[[2]]
|
||||
isoin <- matlab2r::max(muutokset)[[1]]
|
||||
indeksi <- matlab2r::max(muutokset)[[2]]
|
||||
if (isoin > maxMuutos) {
|
||||
maxMuutos <- isoin
|
||||
i1 <- pop
|
||||
|
|
@ -222,8 +222,8 @@ indMix <- function(c, npops, dispText = TRUE) {
|
|||
partitionSummary <- temp_addToSum$partitionSummary
|
||||
added <- temp_addToSum$added
|
||||
if (added == 1) {
|
||||
worstLogml <- min_MATLAB(partitionSummary[, 2])[[1]]
|
||||
worstIndex <- min_MATLAB(partitionSummary[, 2])[[2]]
|
||||
worstLogml <- matlab2r::min(partitionSummary[, 2])[[1]]
|
||||
worstIndex <- matlab2r::min(partitionSummary[, 2])[[2]]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -247,8 +247,8 @@ indMix <- function(c, npops, dispText = TRUE) {
|
|||
muutokset <- laskeMuutokset3(
|
||||
T2, inds2, rows, data, adjprior, priorTerm, pop
|
||||
)
|
||||
isoin <- max_MATLAB(muutokset)[[1]]
|
||||
indeksi <- max_MATLAB(muutokset)[[2]]
|
||||
isoin <- matlab2r::max(muutokset)[[1]]
|
||||
indeksi <- matlab2r::max(muutokset)[[2]]
|
||||
if (isoin > maxMuutos) {
|
||||
maxMuutos <- isoin
|
||||
muuttuvaPop2 <- indeksi %% npops2
|
||||
|
|
@ -289,8 +289,8 @@ indMix <- function(c, npops, dispText = TRUE) {
|
|||
partitionSummary <- temp_addToSum$partitionSummary
|
||||
added <- temp_addToSum$added
|
||||
if (added == 1) {
|
||||
worstLogml <- min_MATLAB(partitionSummary[, 2])[[1]]
|
||||
worstIndex <- min_MATLAB(partitionSummary[, 2])[[2]]
|
||||
worstLogml <- matlab2r::min(partitionSummary[, 2])[[1]]
|
||||
worstIndex <- matlab2r::min(partitionSummary[, 2])[[2]]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -334,8 +334,8 @@ indMix <- function(c, npops, dispText = TRUE) {
|
|||
diffInCounts <- muutokset_diffInCounts$diffInCounts
|
||||
|
||||
muutokset[pop] <- -1e50 # Varmasti ei suurin!!!
|
||||
maxMuutos <- max_MATLAB(muutokset)[[1]]
|
||||
i2 <- max_MATLAB(muutokset)[[2]]
|
||||
maxMuutos <- matlab2r::max(muutokset)[[1]]
|
||||
i2 <- matlab2r::max(muutokset)[[2]]
|
||||
updateGlobalVariables(
|
||||
ind, i2, diffInCounts, adjprior, priorTerm
|
||||
)
|
||||
|
|
@ -370,8 +370,8 @@ indMix <- function(c, npops, dispText = TRUE) {
|
|||
partitionSummary <- temp_addToSum$partitionSummary
|
||||
added <- temp_addToSum$added
|
||||
if (added == 1) {
|
||||
worstLogml <- min_MATLAB(partitionSummary[, 2])[[1]]
|
||||
worstIndex <- min_MATLAB(partitionSummary[, 2])[[2]]
|
||||
worstLogml <- matlab2r::min(partitionSummary[, 2])[[1]]
|
||||
worstIndex <- matlab2r::min(partitionSummary[, 2])[[2]]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -441,7 +441,7 @@ indMix <- function(c, npops, dispText = TRUE) {
|
|||
pop, emptyPop
|
||||
)
|
||||
|
||||
maxMuutos <- indeksi <- max_MATLAB(muutokset)
|
||||
maxMuutos <- indeksi <- matlab2r::max(muutokset)
|
||||
|
||||
muuttuva <- inds2(indeksi)
|
||||
if (PARTITION(muuttuva) == pop) {
|
||||
|
|
@ -474,8 +474,8 @@ indMix <- function(c, npops, dispText = TRUE) {
|
|||
partitionSummary <- temp_addToSum$partitionSummary
|
||||
added <- temp_addToSum$added
|
||||
if (added == 1) {
|
||||
worstLogml <- min_MATLAB(partitionSummary[, 2])[[1]]
|
||||
worstIndex <- min_MATLAB(partitionSummary[, 2])[[2]]
|
||||
worstLogml <- matlab2r::min(partitionSummary[, 2])[[1]]
|
||||
worstIndex <- matlab2r::min(partitionSummary[, 2])[[2]]
|
||||
}
|
||||
}
|
||||
if (muutoksiaNyt == 0) {
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ linkage <- function(Y, method = "co") {
|
|||
for (s in 1:(n - 1)) {
|
||||
X <- as.matrix(as.vector(Y), ncol = 1)
|
||||
|
||||
v <- min_MATLAB(X)$mins
|
||||
k <- min_MATLAB(X)$idx
|
||||
v <- matlab2r::min(X)$mins
|
||||
k <- matlab2r::min(X)$idx
|
||||
|
||||
i <- floor(m + 1 / 2 - sqrt(m^2 - m + 1 / 4 - 2 * (k - 1)))
|
||||
j <- k - (i - 1) * (m - i / 2) + i
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue