diff --git a/R/helpers.R b/R/helpers.R index 1fa3a5f4..18bb9129 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -10,7 +10,8 @@ switch( stat_type, size = stat_latest + n_offspring, - length = stat_latest + pmin(1, n_offspring) + length = stat_latest + pmin(1, n_offspring), + stop("stat_type must be 'size' or 'length'") ) ) } @@ -26,7 +27,8 @@ switch( chain_statistic, size = rbinom_size, - length = rgen_length + length = rgen_length, + stop("chain_statistic must be 'size' or 'length'") ) ) }