Skip to content

Commit

Permalink
override=FALSE -> override=TRUE
Browse files Browse the repository at this point in the history
  • Loading branch information
jgabry committed Sep 21, 2023
1 parent f2fb60e commit 4fd6607
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vignettes/r-markdown.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,16 @@ This is the default option. In that case we can write, for example:
rstan::sampling(model)
```
````
## Option 2: Using CmdStanR for all chunks

## Option 2: Using CmdStanR for all chunks

If CmdStanR is being used a replacement engine needs to be registered along the following lines:

```{r register-engine, message=FALSE}
library(cmdstanr)
check_cmdstan_toolchain(fix = TRUE, quiet = TRUE)
register_knitr_engine(override = FALSE)
register_knitr_engine(override = TRUE)
```

This overrides knitr's built-in `stan` engine so that all `stan`
Expand Down Expand Up @@ -92,6 +94,8 @@ fit <- ex1$sample(
print(fit)
```


## Option 3: Using both RStan and CmdStanR in the same R Markdown document

While the default behavior is to override the built-in `stan` engine because the
Expand Down

0 comments on commit 4fd6607

Please sign in to comment.