diff --git a/DESCRIPTION b/DESCRIPTION index 404497a..ef06d1d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: experDesign Title: Design Experiments for Batches -Version: 0.3.0.9000 +Version: 0.3.0.9001 Authors@R: c( person("LluĂ­s", "Revilla Sancho", , "lluis.revilla@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-9747-2570")), diff --git a/R/indexing.R b/R/indexing.R index 2933868..ace4b6a 100644 --- a/R/indexing.R +++ b/R/indexing.R @@ -73,6 +73,11 @@ create_index4index <- function(index, size_subset, n, name) { if (length(setdiff(pp, which(dups_out)))) { pp <- setdiff(pp, which(dups_out)) } + # Somehow sometimes there is an error with sample! + if (is.null(pp)) { + next + } + i_index <- sample(pp, 1) index_f <- c(index_f, i_index)