Skip to content

Commit

Permalink
limit the number of cores used in tests and vignettes
Browse files Browse the repository at this point in the history
comply with directives from CRAN
see Rdatatable/data.table#5658
  • Loading branch information
levenc committed Dec 8, 2023
1 parent 3cf70c9 commit 789ec64
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
data.table::setDTthreads(2) #throttle data.table for CRAN

library(testthat)
library(posologyr)

Expand Down
4 changes: 4 additions & 0 deletions vignettes/a_posteriori_dosing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ knitr::opts_chunk$set(
set.seed(1)
```

```{r chunkname, echo=-1}
data.table::setDTthreads(2)
```

```{r setup}
library(posologyr)
```
Expand Down
4 changes: 4 additions & 0 deletions vignettes/a_priori_dosing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ knitr::opts_chunk$set(
set.seed(1)
```

```{r chunkname, echo=-1}
data.table::setDTthreads(2)
```

```{r setup}
library(posologyr)
```
Expand Down
4 changes: 4 additions & 0 deletions vignettes/auc_based_dosing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ knitr::opts_chunk$set(
set.seed(1)
```

```{r chunkname, echo=-1}
data.table::setDTthreads(2)
```

```{r setup}
library(posologyr)
```
Expand Down
4 changes: 4 additions & 0 deletions vignettes/multiple_endpoints.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ knitr::opts_chunk$set(
)
```

```{r chunkname, echo=-1}
data.table::setDTthreads(2)
```

```{r setup}
library(posologyr)
```
Expand Down

0 comments on commit 789ec64

Please sign in to comment.