Skip to content

Commit 8367448

Browse files
Choose different Rmd chunk labels
1 parent e43515d commit 8367448

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

vignettes/cmdstanr.Rmd

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,12 @@ and saves the object with `saveRDS()`. To speed up the process, you can emulate
401401
and 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.
412412
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.
419419
The following example saves only posterior draws and discards
420420
sampler 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.
425424
fit$draws()
426425
427426
# Save the object to a file.

0 commit comments

Comments
 (0)