Skip to content

Commit

Permalink
differences for PR #53
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 4, 2024
1 parent 1f11815 commit 0485390
Show file tree
Hide file tree
Showing 12 changed files with 241 additions and 127 deletions.
26 changes: 18 additions & 8 deletions delays-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ library(tidyverse)
withr::local_options(list(mc.cores = 4))
```

::::::::::::::::::: checklist

### The double-colon

The double-colon `::` in R is used to access functions or objects from a specific package without loading the entire package into the current environment. This allows for a more targeted approach to using package components and helps avoid namespace conflicts.

`::` lets you call a specific function from a package by explicitly mentioning the package name. For example, `dplyr::filter(data, condition)` uses `filter()` from the `{dplyr}` package without loading the entire package.

:::::::::::::::::::

## Distribution functions

In R, all the statistical distributions have functions to access the following:
Expand Down Expand Up @@ -150,8 +160,8 @@ generate(covid_serialint, times = 10)
```

```{.output}
[1] 2.889660 9.307841 2.218292 3.749691 5.273008 1.416355 2.502361 2.234118
[9] 2.217577 3.045567
[1] 3.7327205 5.9489185 3.9368463 2.3420749 2.1828592 2.1701174 3.8265515
[8] 1.8415268 2.4269600 0.8082517
```

::::::::: instructor
Expand Down Expand Up @@ -460,10 +470,10 @@ epinow_estimates_cg <- epinow(
```

```{.output}
WARN [2024-04-29 22:16:50] epinow: There were 5 divergent transitions after warmup. See
WARN [2024-05-04 04:03:28] epinow: There were 11 divergent transitions after warmup. See
https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
to find out why this is a problem and how to eliminate them. -
WARN [2024-04-29 22:16:50] epinow: Examine the pairs() plot to diagnose sampling problems
WARN [2024-05-04 04:03:28] epinow: Examine the pairs() plot to diagnose sampling problems
-
```

Expand Down Expand Up @@ -589,10 +599,10 @@ epinow_estimates_cgi <- epinow(
```

```{.output}
WARN [2024-04-29 22:18:38] epinow: There were 7 divergent transitions after warmup. See
WARN [2024-05-04 04:05:16] epinow: There were 8 divergent transitions after warmup. See
https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
to find out why this is a problem and how to eliminate them. -
WARN [2024-04-29 22:18:38] epinow: Examine the pairs() plot to diagnose sampling problems
WARN [2024-05-04 04:05:16] epinow: Examine the pairs() plot to diagnose sampling problems
-
```

Expand Down Expand Up @@ -736,10 +746,10 @@ epinow_estimates_egi <- epinow(
```

```{.output}
WARN [2024-04-29 22:21:52] epinow: There were 3 divergent transitions after warmup. See
WARN [2024-05-04 04:08:50] epinow: There were 4 divergent transitions after warmup. See
https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
to find out why this is a problem and how to eliminate them. -
WARN [2024-04-29 22:21:52] epinow: Examine the pairs() plot to diagnose sampling problems
WARN [2024-05-04 04:08:50] epinow: Examine the pairs() plot to diagnose sampling problems
-
```

Expand Down
10 changes: 10 additions & 0 deletions delays-reuse.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,16 @@ List of <epidist> objects
Number of offspring distributions: 0
```

::::::::::::::::::: checklist

### The double-colon

The double-colon `::` in R is used to access functions or objects from a specific package without loading the entire package into the current environment. This allows for a more targeted approach to using package components and helps avoid namespace conflicts.

`::` lets you call a specific function from a package by explicitly mentioning the package name. For example, `dplyr::filter(data, condition)` uses `filter()` from the `{dplyr}` package without loading the entire package.

:::::::::::::::::::

From the `{epiparameter}` package, we can use the `epidist_db()` function to ask for any `disease` and also for a specific epidemiological distribution (`epi_dist`).

Let's ask now how many parameters we have in the epidemiological distributions database (`epidist_db`) with the generation time using the string `generation`:
Expand Down
Binary file modified fig/delays-functions-rendered-unnamed-chunk-16-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fig/delays-functions-rendered-unnamed-chunk-17-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fig/delays-functions-rendered-unnamed-chunk-20-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fig/delays-functions-rendered-unnamed-chunk-21-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fig/quantify-transmissibility-rendered-unnamed-chunk-17-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"episodes/clean-data.Rmd" "5c4185a8ef7befeb1b7c1e3afc0a30dc" "site/built/clean-data.md" "2024-04-29"
"episodes/describe-cases.Rmd" "5d75abf64023fa00ce11f3b36e3d9a48" "site/built/describe-cases.md" "2024-04-29"
"episodes/simple-analysis.Rmd" "8b1eacfe982b6c8e13b931f399e94652" "site/built/simple-analysis.md" "2024-04-29"
"episodes/delays-reuse.Rmd" "99c8549fdb699dea71a19f6022ddbeff" "site/built/delays-reuse.md" "2024-04-29"
"episodes/quantify-transmissibility.Rmd" "87679a9120c62fde0f6a647d80b72c46" "site/built/quantify-transmissibility.md" "2024-04-29"
"episodes/delays-functions.Rmd" "53216ab4c9d20d5e157bf4a06429f7a9" "site/built/delays-functions.md" "2024-04-29"
"episodes/delays-reuse.Rmd" "06905f0486085d5cde368217a42fbbf4" "site/built/delays-reuse.md" "2024-05-04"
"episodes/quantify-transmissibility.Rmd" "7ecde2de4bca061f1c5434d0ff0ad9fa" "site/built/quantify-transmissibility.md" "2024-05-04"
"episodes/delays-functions.Rmd" "c95ad968a72ea3738f9b382dffc18a9f" "site/built/delays-functions.md" "2024-05-04"
"instructors/instructor-notes.md" "ca3834a1b0f9e70c4702aa7a367a6bb5" "site/built/instructor-notes.md" "2024-04-29"
"learners/reference.md" "106717912e909a7c8d9e3e8fea48e17d" "site/built/reference.md" "2024-04-29"
"learners/setup.md" "64f432f4e2d4e1986341fd106f85b23d" "site/built/setup.md" "2024-04-29"
"learners/setup.md" "323d6594b0bdadcaa62b4d03d45467fd" "site/built/setup.md" "2024-05-04"
"profiles/learner-profiles.md" "31b503c4b5bd1f0960ada730eca4a25e" "site/built/learner-profiles.md" "2024-04-29"
"renv/profiles/lesson-requirements/renv.lock" "0a590d508237e49dff0968d512a60cd3" "site/built/renv.lock" "2024-04-29"
Loading

0 comments on commit 0485390

Please sign in to comment.