From 61615bdea8631f21b4e16f579890838944dcf758 Mon Sep 17 00:00:00 2001 From: richardreeve Date: Mon, 28 Nov 2022 12:28:46 +0000 Subject: [PATCH] Update practicals --- inst/tutorials/practical2-1/practical2-1.Rmd | 31 +++++++++----------- inst/tutorials/practical2-2/practical2-2.Rmd | 8 ++--- inst/tutorials/practical2-3/practical2-3.Rmd | 4 +-- inst/tutorials/practical2-4/practical2-4.Rmd | 4 +-- 4 files changed, 22 insertions(+), 25 deletions(-) diff --git a/inst/tutorials/practical2-1/practical2-1.Rmd b/inst/tutorials/practical2-1/practical2-1.Rmd index 2bcbf63d..4ce6754f 100644 --- a/inst/tutorials/practical2-1/practical2-1.Rmd +++ b/inst/tutorials/practical2-1/practical2-1.Rmd @@ -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
rate, $\\beta$", "Basic reproduction number, $R_0$", - "Proportion susceptible
at equilibrium, $\\frac{S}{N}$", - "Inverse $R_0$,
$\\frac{1}{R_0}$") + "Inverse $R_0$,
$\\frac{1}{R_0}$", + "Proportion susceptible
at equilibrium, $\\frac{S}{N}$") col <- gsub("<", "<", col) col <- gsub(">", ">", col) colnames(table) <- col @@ -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 @@ -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 @@ -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.** diff --git a/inst/tutorials/practical2-2/practical2-2.Rmd b/inst/tutorials/practical2-2/practical2-2.Rmd index a511b831..a22821da 100644 --- a/inst/tutorials/practical2-2/practical2-2.Rmd +++ b/inst/tutorials/practical2-2/practical2-2.Rmd @@ -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 @@ -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.** diff --git a/inst/tutorials/practical2-3/practical2-3.Rmd b/inst/tutorials/practical2-3/practical2-3.Rmd index de4b604d..d2e54ff7 100644 --- a/inst/tutorials/practical2-3/practical2-3.Rmd +++ b/inst/tutorials/practical2-3/practical2-3.Rmd @@ -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 @@ -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. diff --git a/inst/tutorials/practical2-4/practical2-4.Rmd b/inst/tutorials/practical2-4/practical2-4.Rmd index e4046106..531469ed 100644 --- a/inst/tutorials/practical2-4/practical2-4.Rmd +++ b/inst/tutorials/practical2-4/practical2-4.Rmd @@ -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 @@ -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.