Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ Suggests:
roxygen2 (>= 6.0.1),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
roxygen2 (>= 6.0.1),
roxygen2 (>= 7.0.0),

I think the new vignette should work with v7 or greater

rmarkdown,
rstudioapi
RoxygenNote: 7.3.3
VignetteBuilder: knitr
Roxygen: list(markdown = TRUE)
Config/roxygen2/version: 8.0.0
2 changes: 2 additions & 0 deletions man/rstantools-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions vignettes/minimal-rstan-package.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ model {
}
"
writeLines(stan_prog, con = file.path(PATH, "inst", "stan", "lm.stan"))
rstan_config(PATH)
```

The `inst/stan` subdirectory can contain additional Stan programs if
Expand All @@ -179,7 +178,7 @@ the package functions. The following comment block placed in `lm_stan.R`
ensures that the function has a help file and that it is added to the package
`NAMESPACE`:

```{r}
```{r, eval=FALSE}
# Save this file as `R/lm_stan.R`

#' Bayesian linear regression with Stan
Expand Down Expand Up @@ -244,8 +243,8 @@ roxygen2::roxygenize()
```

```{r, echo=FALSE, results="hide"}
try(roxygen2::roxygenize(PATH, load_code = rstantools_load_code), silent = TRUE)
roxygen2::roxygenize(PATH)
roxygen2::roxygenize(PATH, load_code = roxygen2::load_source)
rstan_config(PATH)
```

## Install and use
Expand All @@ -268,11 +267,8 @@ documentation, you can set `quick=TRUE` to speed up the process, or use

After installation, the package can be loaded and used like any other R package:

```{r, eval=FALSE}
library("rstanlm")
```

```{r}
library(rstanlm)
fit <- lm_stan(y = rnorm(10), x = rnorm(10),
# arguments passed to sampling
iter = 2000, refresh = 500)
Expand Down
Loading