@@ -401,12 +401,12 @@ and saves the object with `saveRDS()`. To speed up the process, you can emulate
401401and replace ` saveRDS ` with the much faster ` qsave() ` function from the
402402[ ` qs ` ] ( https://github.com/traversc/qs ) package.
403403
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.
410410
411411# Save the object to a file.
412412qs::qsave(x = fit, file = "fit.qs")
@@ -419,9 +419,8 @@ Storage is even faster if you discard results you do not need to save.
419419The following example saves only posterior draws and discards
420420sampler diagnostics, user-specified initial values, and profiling data.
421421
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.
425424fit$draws()
426425
427426# Save the object to a file.
0 commit comments