@@ -401,12 +401,12 @@ and saves the object with `saveRDS()`. To speed up the process, you can emulate
401
401
and replace ` saveRDS ` with the much faster ` qsave() ` function from the
402
402
[ ` qs ` ] ( https://github.com/traversc/qs ) package.
403
403
404
- ``` {r save_object_qs , eval = FALSE}
405
- # Load CmdStan files into the fitted model object.
406
- fit$draws()
407
- try(fit$sampler_diagnostics(), silent = TRUE)
408
- try(fit$init(), silent = TRUE)
409
- try(fit$profiles(), silent = TRUE)
404
+ ``` {r save_object_qs_full , eval = FALSE}
405
+ # Load CmdStan output files into the fitted model object.
406
+ fit$draws() # Load posterior draws into the object.
407
+ try(fit$sampler_diagnostics(), silent = TRUE) # Load sampler diagnostics.
408
+ try(fit$init(), silent = TRUE) # Load user-defined initial values.
409
+ try(fit$profiles(), silent = TRUE) # Load profiling samples.
410
410
411
411
# Save the object to a file.
412
412
qs::qsave(x = fit, file = "fit.qs")
@@ -419,9 +419,8 @@ Storage is even faster if you discard results you do not need to save.
419
419
The following example saves only posterior draws and discards
420
420
sampler diagnostics, user-specified initial values, and profiling data.
421
421
422
-
423
- ``` {r save_object_qs, eval = FALSE}
424
- # Load posterior draws into the fitted model object.
422
+ ``` {r save_object_qs_small, eval = FALSE}
423
+ # Load posterior draws into the fitted model object and omit other output.
425
424
fit$draws()
426
425
427
426
# Save the object to a file.
0 commit comments