Skip to content

Commit

Permalink
Prevent an error
Browse files Browse the repository at this point in the history
  • Loading branch information
llrs committed Apr 29, 2024
1 parent 736e1cd commit af3ceaa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-9747-2570")),
Expand Down
5 changes: 5 additions & 0 deletions R/indexing.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit af3ceaa

Please sign in to comment.