From 68ad663ce1833b0fbcf9e4714b912de2bad145a9 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Fri, 15 Jan 2021 11:46:53 +0100 Subject: [PATCH] Fixed syntax --- R/greedyMix.R | 2 +- R/indMix.R | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/greedyMix.R b/R/greedyMix.R index 132299e..058df21 100644 --- a/R/greedyMix.R +++ b/R/greedyMix.R @@ -268,7 +268,7 @@ greedyMix <- function( ninds <- length(unique(data[, ncol(data)])) ekat <- t(seq(1, ninds, rowsFromInd) * rowsFromInd) - c$rows <- c(ekat, ekat + rowsFromInd - 1) + c$rows <- t(rbind(ekat, ekat + rowsFromInd - 1)) # ASK remove? # partition compare diff --git a/R/indMix.R b/R/indMix.R index 3fc2359..b564460 100644 --- a/R/indMix.R +++ b/R/indMix.R @@ -42,7 +42,7 @@ indMix <- function(c, npops, dispText) { npopstext <- c(npopstext, ' ', npopstextExtra) teksti <- 'The input field length limit (255 characters) was reached. Input more values: ' } else { - npopstext <- c(npopstext, ' ', npopstextExtra) + npopstext <- strsplit(npopstextExtra, " ")[[1]] ready <- TRUE } } @@ -76,7 +76,7 @@ indMix <- function(c, npops, dispText) { worstLogml <- -1e50 worstIndex <- 1 for (run in 1:nruns) { - npops <- npopsTaulu[run] + npops <- npopsTaulu[[run]] if (dispText) { dispLine() print( @@ -99,7 +99,7 @@ indMix <- function(c, npops, dispText) { PARTITION <- zeros(ninds, 1) for (i in 1:ninds) { apu <- rows[i] - PARTITION[i] <- initialPartition(apu[1]) + PARTITION[i] <- initialPartition[apu[1]] } COUNTS <- counts