From 8c060057e4f46fa48b51dad5a30e9623e3425e90 Mon Sep 17 00:00:00 2001 From: sbeck Date: Tue, 17 Apr 2018 16:00:56 +0200 Subject: [PATCH] Added Sampling of Proportions Before the change, the first distribution always was the smallest. Adding a sample() makes it possible for each distribution to be the largest. --- R/simulation.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/simulation.R b/R/simulation.R index e5a5578..ef822e7 100644 --- a/R/simulation.R +++ b/R/simulation.R @@ -235,7 +235,7 @@ createValidationData <- function(params = newParams(),verbose = TRUE){ combs <- do.call('rbind',combsSorted) uniqueCombs <- unique.array(combs) sampleProp <- sample(1:nrow(uniqueCombs),1,replace = FALSE) - ranProps <- uniqueCombs[sampleProp,] + ranProps <- sample(uniqueCombs[sampleProp,]) ranSd<- unlist(lapply(2:modality,function(i){ eval(parse(text = paste(paste0("ranSd",i),