Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add loading of INLA at start of tutorials #77

Merged
merged 1 commit into from
Aug 10, 2023
Merged
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
5 changes: 4 additions & 1 deletion vignettes/covid.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ The first thing is to load all the packages used in the COVID-19 case study.

The study region is mainland England, which is partitioned into 6789 neighbourhoods at the Middle Layer Super Output Area (MSOA) scale. The shapefile of the study region `shape` is a `SpatialPolygonsDataFrame`, which is used to map the data. It stores the location, shape and attributes of geographic features for the neighbourhoods.load

We first need to retrieve the data from the fdmr example data store and unpack it and we'll use `retrieve_tutorial_data` to do this.
We first load INLA and then retrieve the data from the fdmr example data store. We'll use `retrieve_tutorial_data` to do this.

```{r}
library(INLA)
```
```{r}
fdmr::retrieve_tutorial_data(dataset = "covid")
```
Expand Down
6 changes: 5 additions & 1 deletion vignettes/covid_mcmc.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ This tutorial requires the [CARBayes package](https://cran.r-project.org/web/pac

The study region is mainland England, which is partitioned into 6789 neighbourhoods at the Middle Layer Super Output Area (MSOA) scale. The infections data are the total reported number of COVID-19 cases in each MSOA from Jan 8, 2022 to March 26, 2022. The shapefile of the study region is a `SpatialPolygonsDataFrame`, which is used to map the data. It stores the location, shape and attributes of geographic features for the neighbourhoods.

We first need to retrieve the infections data from the fdmr example data store and unpack it and we'll use retrieve_tutorial_data to do this.
We first load INLA and then retrieve the data from the fdmr example data store. We'll use `retrieve_tutorial_data` to do this.

```{r}
library(INLA)
```

```{r}
fdmr::retrieve_tutorial_data(dataset = "covid_mcmc")
Expand Down
6 changes: 5 additions & 1 deletion vignettes/hydro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ vignette: >

If you do not have `INLA` or `inlabru` installed [please go to the following installation tutorial before continuing](link%20to%20installation%20tutorial).

First we'll download the data for this tutorial from our [data repository](https://github.com/4DModeller/fdmr_data) using `retrieve_tutorial_data`.
First we load INLA and then download the data for this tutorial from our [data repository](https://github.com/4DModeller/fdmr_data) using `retrieve_tutorial_data`.

```{r}
library(INLA)
```

```{r error=TRUE,message=FALSE,warning=FALSE}
fdmr::retrieve_tutorial_data(dataset = "hydro")
Expand Down
6 changes: 4 additions & 2 deletions vignettes/priors.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ In this tutorial we'll show an example of exploring the impact of different prio

The study region is Bristol city, which is partitioned into 55 neighbourhoods at the Middle Layer Super Output Area (MSOA) scale. The shapefile of the study region `shape` is a `SpatialPolygonsDataFrame`, which is used to map the data. It stores the location, shape and attributes of geographic features for the neighbourhoods.

We first need to retrieve the data from the fdmr example data store and unpack it and we'll use `retrieve_tutorial_data` to do this.

We first load INLA and then retrieve the data from the fdmr example data store. We'll use `retrieve_tutorial_data` to do this.
```{r}
library(INLA)
```
```{r}
fdmr::retrieve_tutorial_data(dataset = "priors")
```
Expand Down
Loading