Skip to content

Commit

Permalink
Update practicals
Browse files Browse the repository at this point in the history
  • Loading branch information
richardreeve committed Nov 28, 2022
1 parent ce8e6eb commit 61615bd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 25 deletions.
31 changes: 14 additions & 17 deletions inst/tutorials/practical2-1/practical2-1.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,19 @@ R0 <- ecoli.transmission / ecoli.recovery

Either using your plots or by asking R to
print out the data frame `population` work out the proportion of the population
susceptible at equilibrium and compare it with the value of $\frac{1}{R_0}$.
who are susceptible at equilibrium -- when the lines are flat -- and compare it
with the value of $\frac{1}{R_0}$ for one example value of the transmission
rate $\beta = 2/3$.

```{r, echo = FALSE}
tmp <- vapply(c(1/2, 2/3, 1, 4/3),
tmp <- vapply(2/3,
function(x) as.character(MASS::fractions(x)),
character(1))
table <- data.frame(tmp, NA, NA, NA)
col <- c("Transmission <br> rate, $\\beta$",
"Basic reproduction number, $R_0$",
"Proportion susceptible <br> at equilibrium, $\\frac{S}{N}$",
"Inverse $R_0$, <br> $\\frac{1}{R_0}$")
"Inverse $R_0$, <br> $\\frac{1}{R_0}$",
"Proportion susceptible <br> at equilibrium, $\\frac{S}{N}$")
col <- gsub("&lt;", "<", col)
col <- gsub("&gt;", ">", col)
colnames(table) <- col
Expand All @@ -183,17 +185,12 @@ data frame.

## Report
Adapt your script to generate a report which shows you running the model with at
least a couple of different transmission rates and calculating different values
for $R_0$ from the results with some explanation of what's going on. You
should also submit a table in Word or Excel with the above values filled in --
just save it in the project folder. In particular for *E. coli O157* infections
least a couple of different transmission rates (including $2/3$) and perhaps try
calculating different values for $R_0$ from the results with some explanation of
what's going on. Note that for example for *E. coli O157* infections
in cattle, for timesteps in weeks, the recovery rate is about $\frac{1}{3}$ and
the transmission rate is 1.

Optionally, try putting the table into the report (possibly using the
`kable()` function in the `knitr` package). However, the table itself
(in any form) is sufficient for assessment.

## GitHub

In this exercise, we want you to get a couple of other people to check your code
Expand All @@ -207,9 +204,9 @@ RStudio (just commit the R files - not, for instance, any
html files that were created by generating reports, though you may decide to
commit a spreadsheet with the table in as well). Don't forget then to push
the changes to GitHub and check on the website that it contains your new code.
Notify the partners we have allocated you that you have something for them to
Notify the partners in your group that you have something for them to
check. If you're not sitting next to them, then you can create an issue in your
repository asking for their review and/or talk to them on Zoom - you can contact
repository asking for their review - you can contact
them by tagging them in the message with `@theirusername`, and they should
receive an email and a [notification on the website](https://github.com/notifications).
They should then create an issue, telling you if they had any problems
Expand All @@ -223,9 +220,9 @@ then *Version Control*, *Git*, and then put in the URL from GitHub and tick
`Open in New Session`. In the new RStudio session that is opened, you can then
run their code and make sure it works. If it does not, just respond in the Issue
that they opened on GitHub explaining what went wrong (though it might be easier
to do this in person on Zoom if they are there). If it works, then you also need
to do this in person as well!). If it works, then you also need
to respond saying so. If you have already checked their repo once already, then
see the instructions in 2-2 for how to update your copy of it.

**Interacting like this through GitHub to help each other will count as your
engagement marks for the course.**
**Remember that interacting like this through GitHub to help each other will
count as your engagement marks for the course.**
8 changes: 4 additions & 4 deletions inst/tutorials/practical2-2/practical2-2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ html files that were created by generating reports). Don't forget then to push
the changes to GitHub and check on the website that it contains your new code.
Notify your partners that you have something for them to
check. If you're not sitting next to them, then you can create an issue in your
repository asking for their review and/or talk to them on Zoom - you can
repository asking for their review - you can
contact them by tagging them in the message with `@theirusername`, and they
should receive an email and a [notification on the website](https://github.com/notifications).
They should then create an issue, telling you if they had any problems
Expand All @@ -121,7 +121,7 @@ person's work, or a new project, refer to the instructions in Practical 2-1.
Once you've checked that the new code has downloaded, you can then run their
code and make sure it works. Open an issue on GitHub to say if it works, or
explaining what went wrong if it doesn't (it might help to also do this in
person or on Zoom if they are there).
person as well if they are there).

Interacting like this through GitHub to help each other will count as
your engagement marks for the course.
**Remember that interacting like this through GitHub to help each other will
count as your engagement marks for the course.**
4 changes: 2 additions & 2 deletions inst/tutorials/practical2-3/practical2-3.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ html files that were created by generating reports). Don't forget then to push
the changes to GitHub and check on the website that it contains your new code.
Notify your partners that you have something for them to
check. If you're not sitting next to them, then you can create an issue in your
repository asking for their review and/or talk to them on Zoom - you can
repository asking for their review - you can
contact them by tagging them in the message with `@theirusername`, and they
should receive an email and a [notification on the website](https://github.com/notifications).
They should then create an issue, telling you if they had any problems
Expand All @@ -128,7 +128,7 @@ person's work, or a new project, refer to the instructions in Practical 2-1.
Once you've checked that the new code has downloaded, you can then run their
code and make sure it works. Open an issue on GitHub to say if it works, or
explaining what went wrong if it doesn't (it might help to also do this in
person or on Zoom if they are there).
person if they are there).

Interacting like this through GitHub to help each other will count as
your engagement marks for the course.
4 changes: 2 additions & 2 deletions inst/tutorials/practical2-4/practical2-4.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ html files that were created by generating reports). Don't forget then to push
the changes to GitHub and check on the website that it contains your new code.
Notify your partners that you have something for them to
check. If you're not sitting next to them, then you can create an issue in your
repository asking for their review and/or talk to them on Zoom - you can
repository asking for their review - you can
contact them by tagging them in the message with `@theirusername`, and they
should receive an email and a [notification on the website](https://github.com/notifications).
They should then create an issue, telling you if they had any problems
Expand All @@ -102,7 +102,7 @@ person's work, or a new project, refer to the instructions in Practical 2-1.
Once you've checked that the new code has downloaded, you can then run their
code and make sure it works. Open an issue on GitHub to say if it works, or
explaining what went wrong if it doesn't (it might help to also do this in
person or on Zoom if they are there).
person if they are there).

Interacting like this through GitHub to help each other will count as
your engagement marks for the course.

0 comments on commit 61615bd

Please sign in to comment.