From f57d5f22167d3ec9bbd7776b2117c8d18d38edf7 Mon Sep 17 00:00:00 2001 From: Dr Nathan Green Date: Thu, 4 Jul 2019 09:31:03 +0100 Subject: [PATCH 1/2] typo --- tb_practical.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_practical.Rmd b/tb_practical.Rmd index d876d9c..7aa4fa4 100644 --- a/tb_practical.Rmd +++ b/tb_practical.Rmd @@ -308,7 +308,7 @@ out$lines ``` -We have produced and incidence trajectory for a system that seems to be in endemic equilibrium. What does this mean? +We have produced an incidence trajectory for a system that seems to be in endemic equilibrium. What does this mean? **4) Can you take a moment and try to explain in a few words what it means for an epidemic to achieve an endemic equilibrium?** From 049f6e16c3a41a8be89a783faf0fec7d9c7496fd Mon Sep 17 00:00:00 2001 From: Dr Nathan Green Date: Thu, 4 Jul 2019 14:59:42 +0100 Subject: [PATCH 2/2] tidy min(max()) --- tb_practical.Rmd | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tb_practical.Rmd b/tb_practical.Rmd index 7aa4fa4..422ad28 100644 --- a/tb_practical.Rmd +++ b/tb_practical.Rmd @@ -437,10 +437,7 @@ First, we need to create a wrapper function that allows us to scale-up our inter scale_up<- function (t, state, parameters,t.interv,parameters_old,fx) { scale <- min((t-t.interv[1])/(t.interv[2]-t.interv[1]),1); - if (scale<0) - { - scale=0 - } + scale <- max(0, scale) pars_scaled <- parameters;