@@ -127,12 +127,12 @@ bootstrap_model <- function(base_model,
127127 } else {
128128 stop(" base_data cannot be automatically inferred, " ,
129129 " please supply data as base_data " ,
130- " to this function" , call. = FALSE )
130+ " to this function" )
131131 }
132132
133133 warning(" Please supply data through the argument base_data; " ,
134134 " automatic reading from your model can produce " ,
135- " unforeseeable bugs." , call. = FALSE )
135+ " unforeseeable bugs." )
136136 }
137137
138138 if (missing(parallelism )) {
@@ -142,7 +142,7 @@ bootstrap_model <- function(base_model,
142142 if (! requireNamespace(" parallel" , quietly = TRUE )) { # nocov start
143143 stop(" setting `num_cores` greater than 1 without setting " ,
144144 " `parallelism` uses `package:parallel`, " ,
145- " but it's not installed" , call. = FALSE )
145+ " but it's not installed" )
146146 }
147147 parallelism <- " parallel" # nocov end
148148 } else {
@@ -152,25 +152,23 @@ bootstrap_model <- function(base_model,
152152 parallelism <- match.arg(parallelism )
153153 if (parallelism == " none" && ! is.null(num_cores ) && num_cores > 1 ) {
154154 stop(" contradiction between `parallelism = \" none\" ` " ,
155- " and `num_cores = " , num_cores , " `; please resolve" ,
156- call. = FALSE )
155+ " and `num_cores = " , num_cores , " `; please resolve" )
157156 }
158157 if (parallelism == " future" ) {
159158 if (! requireNamespace(" future.apply" , quietly = TRUE )) { # nocov start
160159 stop(" `parallelism = \" future\" ` uses `package:future.apply`, " ,
161- " but it's not installed" , call. = FALSE )
160+ " but it's not installed" )
162161 } # nocov end
163162 if (! is.null(num_cores )) {
164163 stop(" with `parallelism = \" future\" `, the `num_cores` " ,
165164 " argument is not used to set up the backend; " ,
166- " use `future::plan` instead" ,
167- call. = FALSE )
165+ " use `future::plan` instead" )
168166 }
169167 }
170168 if (parallelism == " parallel" ) {
171169 if (! requireNamespace(" parallel" , quietly = TRUE )) { # nocov start
172170 stop(" `parallelism = \" parallel\" ` uses `package:parallel`, " ,
173- " but it's not installed" , call. = FALSE )
171+ " but it's not installed" )
174172 } # nocov end
175173
176174 if (is.null(num_cores )) { # nocov start
@@ -183,7 +181,7 @@ bootstrap_model <- function(base_model,
183181
184182 if (parallelism != " future" && ! is.null(future_packages )) {
185183 stop(" Argument `future_packages` should only be set when " ,
186- " using `parallelism = \" future\" `" , call. = FALSE )
184+ " using `parallelism = \" future\" `" )
187185 }
188186
189187 # #------------------------------------
@@ -205,7 +203,7 @@ bootstrap_model <- function(base_model,
205203 } else {
206204 if (! list_of_matrices(base_coef )) {
207205 stop(" currently this method needs `coef(summary(base_model))` " , # nocov start
208- " to be a matrix, or a list of them" , call. = FALSE ) # nocov end
206+ " to be a matrix, or a list of them" ) # nocov end
209207 }
210208 # # only calc not_null once, but local scope the result
211209 extract_coef <- (function (not_null ){
@@ -234,7 +232,7 @@ bootstrap_model <- function(base_model,
234232 if (sum(rand_cols %in% resample_specific_blocks ) == 0 &&
235233 length(rand_cols ) > 0 ) {
236234 stop(" No random columns from formula found " ,
237- " in resample_specific_blocks" , call. = FALSE )
235+ " in resample_specific_blocks" )
238236 }
239237 rand_cols <- rand_cols [rand_cols %in% resample_specific_blocks ]
240238 }
@@ -338,8 +336,7 @@ bootstrap_model <- function(base_model,
338336 }
339337 if (any(error_ind )) {
340338 stop(" could not generate error-free resamples in " , # nocov start
341- max_redos , " attempts" ,
342- call. = FALSE ) # nocov end
339+ max_redos , " attempts" ) # nocov end
343340 }
344341
345342 if (return_coefs_instead ) {
@@ -361,37 +358,6 @@ bootstrap_model <- function(base_model,
361358}
362359
363360
364- # ' @export
365- # ' @rdname bootstrap_model
366- # ' @param suppress_loading_bar
367- # ' defunct now
368- # ' @param allow_conv_error
369- # ' defunct now
370- BootGlmm <- function (base_model , # nocov start
371- resamples = 9999 ,
372- base_data = NULL ,
373- return_coefs_instead = FALSE ,
374- resample_specific_blocks = NULL ,
375- unique_resample_lim = NULL ,
376- narrowness_avoid = TRUE ,
377- num_cores = NULL ,
378- suppress_sampling_message = FALSE ,
379- suppress_loading_bar = FALSE ,
380- allow_conv_error = FALSE ){
381- .Deprecated(" bootstrap_model" )
382-
383- bootstrap_model(base_model = base_model ,
384- base_data = base_data ,
385- resamples = resamples ,
386- return_coefs_instead = return_coefs_instead ,
387- resample_specific_blocks = resample_specific_blocks ,
388- unique_resample_lim = unique_resample_lim ,
389- narrowness_avoid = narrowness_avoid ,
390- num_cores = num_cores ,
391- suppress_sampling_message = suppress_sampling_message )
392- } # nocov end
393-
394-
395361# ' Runs the bootstrapping of the models.
396362# '
397363# ' This function gets passed a function that runs a single bootstrap resample
@@ -417,7 +383,8 @@ bootstrap_runner <- function(bootstrap_function,
417383 function (i ){
418384 bootstrap_function()
419385 },
420- future.packages = future_packages ))
386+ future.packages = future_packages ,
387+ future.seed = TRUE ))
421388 }
422389
423390 if (parallelism == " parallel" ) {
0 commit comments