Skip to content
Snippets Groups Projects
Commit 9cc64273 authored by dj44vuri's avatar dj44vuri
Browse files

improved error message if chuncks is not an integer

parent 493fa987
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,6 @@ Version: 0.2.0.9006
Authors@R:
person(given = "Julian", family = "Sagebiel", email = "julian.sagebiel@idiv.de", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-0253-6875"))
person(given = "Samuel", family = "Smock", email = "samuel.smock@idiv.de", role = c("aut", "cre"))
Description: A package that supports simulating choice experiment data for given designs. It helps to quickly test different designs against each other.
License: MIT + file LICENSE
Encoding: UTF-8
......
......@@ -16,6 +16,10 @@
#'
sim_choice <- function(designfile, no_sim = 10, respondents = 330, u ,designtype = NULL, destype = NULL, bcoeff, decisiongroups=c(0,1), manipulations = list() , estimate, chunks=1, utility_transform_type = "simple") {
# Stop condition to check if chunks is a positive integer
if (!is.numeric(chunks) || chunks <= 0 || chunks != as.integer(chunks)) {
stop("`chunks` must be a positive integer.")
}
if (utility_transform_type == "simple") {
message("'simple' is deprecated and will be removed in the future. Use 'exact' instead.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment