diff --git a/DESCRIPTION b/DESCRIPTION index 247afbc..4591e98 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -35,6 +35,6 @@ VignetteBuilder: knitr License: GPL (>=2) Encoding: UTF-8 LazyData: true -RoxygenNote: 7.1.2 +RoxygenNote: 7.2.3 Depends: R (>= 3.5.0) diff --git a/R/AnophelesModel_db_query.R b/R/AnophelesModel_db_query.R index 9c198a8..18045a8 100644 --- a/R/AnophelesModel_db_query.R +++ b/R/AnophelesModel_db_query.R @@ -201,7 +201,7 @@ get_net_types = function() { #' #' #' @examples -#' net_insecticide_types = get_net_insecticide_types() +#' net_insecticide_types = get_net_insecticides() #' print(net_insecticide_types) #' #' @export @@ -285,8 +285,6 @@ get_net_decay = function(net_type, country, insecticide_type, n_ips, duration){ #' @references TO DO #' #' @examples -#' net_surv = get_net_survival_and_holed_area() -#' print(net_surv) #' #' @export #' diff --git a/README.md b/README.md index 7ae712e..24d9402 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ To install the package: ```{r} devtools::install_github("SwissTPH/AnophelesModel", build_vignettes = TRUE) ``` +IMPORTANT: To be able to build the vignette during package installation, you need to have the following packages installed: DiagrammeR, ggpubr, and Hmisc. + A documentation describing the package use cases and functions is available [here](https://swisstph.github.io/AnophelesModel/articles/AnophelesModel.html) and can also be accessed using the following R command: ```{r} browseVignettes(AnophelesModel) diff --git a/docs/404.html b/docs/404.html index 0f49e70..e2b5ebd 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@
AnophelesModel.Rmd
The AnophelesModel
package can be used to parameterize a model of the mosquito feeding cycle using data about mosquito bionomics (entomological characteristics) and biting patterns, as well as human activity and intervention effects. The different types of data have been extracted from field studies and are included in the package. The model infers the species-specific impact of various vector control interventions on the vectorial capacity. The package can be used to compare the impact of interventions for different mosquito species and to generate parameterizations for the entomological and vector control components of more complex models of malaria transmission dynamics.
The AnophelesModel
package is based on a state transition model of the feeding dynamics of a mosquito population biting a population of hosts defined in (Chitnis, Smith, and Steketee 2008). The model consists of a system of three difference equations describing the dynamics in the numbers of not-infected, infected, and infective mosquitoes, respectively. The transitions between the individual steps of the cycle for a host i are modeled through probabilities and summarized as follows:
These probabilities (represented by the arrows in the diagram above) are in turn affected by mosquito ecology, human behavior and interventions as described in the following sections of this vignette.
-This documentation provides information about the various use-cases of the package with examples. First, it gives an overview of the general analysis workflow. Next, it presents the contents of the package database and its data objects. Finally, it provides more detailed example use cases of the package functions. These examples include how to parameterize the embedded entomological model and evaluate the impact of various vector control interventions for different mosquito species and geographical locations. In addition, examples are shown about how to produce formatted inputs for downstream analyses with the OpenMalaria (Smith et al. 2006) individual-based model of malaria transmission dynamics.
+The AnophelesModel
package can be used to parameterize a
+model of the mosquito feeding cycle using data about mosquito bionomics
+(entomological characteristics) and biting patterns, as well as human
+activity and intervention effects. The different types of data have been
+extracted from field studies and are included in the package. The model
+infers the species-specific impact of various vector control
+interventions on the vectorial capacity. The package can be used to
+compare the impact of interventions for different mosquito species and
+to generate parameterizations for the entomological and vector control
+components of more complex models of malaria transmission dynamics.
The AnophelesModel
package is based on a state
+transition model of the feeding dynamics of a mosquito population biting
+a population of hosts defined in (Chitnis, Smith,
+and Steketee 2008). The model consists of a system of three
+difference equations describing the dynamics in the numbers of
+not-infected, infected, and infective mosquitoes, respectively. The
+transitions between the individual steps of the cycle for a host
+i are modeled through probabilities and summarized as
+follows:
These probabilities (represented by the arrows in the diagram above) +are in turn affected by mosquito ecology, human behavior and +interventions as described in the following sections of this +vignette.
+This documentation provides information about the various use-cases +of the package with examples. First, it gives an overview of the general +analysis workflow. Next, it presents the contents of the package +database and its data objects. Finally, it provides more detailed +example use cases of the package functions. These examples include how +to parameterize the embedded entomological model and evaluate the impact +of various vector control interventions for different mosquito species +and geographical locations. In addition, examples are shown about how to +produce formatted inputs for downstream analyses with the OpenMalaria +(Smith et al. 2006) individual-based model +of malaria transmission dynamics.
With the main AnophelesModel()
package function, the user can run in one go the main analysis steps for parameterizing the model of the mosquito feeding cycle (Chitnis, Smith, and Steketee 2008) and estimate the reduction on the vectorial capacity for various vector control interventions. These steps are summarized in the diagram below, alongside the corresponding functions:
The user can directly run the AnophelesModel()
function as an initial test run with a default analysis. By default, the AnophelesModel()
function performs the above steps considering the parameters for An. gambiae in a Kenyan setting and with default activity patterns for mosquitoes and humans. It calibrates the entomological model, estimates the impact of indoor residual spraying (IRS), long-lasting insecticide-treated nets (LLINs) and house screening, then plots the average vectorial capacity for a range of intervention coverages:
With the main AnophelesModel()
package function, the
+user can run in one go the main analysis steps for parameterizing the
+model of the mosquito feeding cycle (Chitnis,
+Smith, and Steketee 2008) and estimate the reduction on the
+vectorial capacity for various vector control interventions. These steps
+are summarized in the diagram below, alongside the corresponding
+functions:
The user can directly run the AnophelesModel()
function
+as an initial test run with a default analysis. By default, the
+AnophelesModel()
function performs the above steps
+considering the parameters for An. gambiae in a Kenyan setting
+and with default activity patterns for mosquitoes and humans. It
+calibrates the entomological model, estimates the impact of indoor
+residual spraying (IRS), long-lasting insecticide-treated nets (LLINs)
+and house screening, then plots the average vectorial capacity for a
+range of intervention coverages:
# load the AnophelesModel package
library(AnophelesModel)
@@ -111,47 +158,81 @@ General workflow#> [1] "Using intervention effects available for model IRS12"
#> [1] "IRS"
#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
-#> c(0.041666667, : some 'x' values beyond boundary knots may cause ill-conditioned
-#> bases
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
-#> c(0.041666667, : some 'x' values beyond boundary knots may cause ill-conditioned
-#> bases
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
-#> c(0.041666667, : some 'x' values beyond boundary knots may cause ill-conditioned
-#> bases
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
#> [1] "Defining intervention effects for House_screening"
#> [1] "Using intervention effects available for model Screening01"
#> [1] "Calculating interventions impact ..."
In the section Estimating the impact of vector control interventions, we describe in detail how the user can access the functionalities of the package to customize the call to this function or set up their own workflow to run the analysis within the settings of interest.
+In the section Estimating +the impact of vector control interventions, we describe in detail +how the user can access the functionalities of the package to customize +the call to this function or set up their own workflow to run the +analysis within the settings of interest.
The package includes a comprehensive, curated database describing mosquito, human and intervention characteristics extracted after processing publicly available field data and organized into multiple data objects. Precisely, these objects include entomological (or bionomics) parameters characterizing various Anopheles species, their transitions in the mosquito feeding cycle, activity cycles of humans and mosquitoes, as well as parameters estimated from experimental hut studies describing the effects of various interventions. These parameters are used together within the entomological model included in the package to estimate the impact of interventions on the vectorial capacity. All the data objects are directly accessible to the user after loading the AnophelesModel
package.
The package includes a comprehensive, curated database describing
+mosquito, human and intervention characteristics extracted after
+processing publicly available field data and organized into multiple
+data objects. Precisely, these objects include entomological (or
+bionomics) parameters characterizing various Anopheles species,
+their transitions in the mosquito feeding cycle, activity cycles of
+humans and mosquitoes, as well as parameters estimated from experimental
+hut studies describing the effects of various interventions. These
+parameters are used together within the entomological model included in
+the package to estimate the impact of interventions on the vectorial
+capacity. All the data objects are directly accessible to the user after
+loading the AnophelesModel
package.
The entomological model in the AnophelesModel
package considers three classes of hosts (denoted with subscript i): humans protected by interventions, non-protected humans, and animal hosts. Each type of host determines specific transition probabilities between the consecutive stages of the mosquito feeding cycle (e.g., interventions such as nets will affect the probability of mosquito feeding on protected humans). The object host_ent_param
in the package database contains, in absence of interventions, for human and animal hosts, default probabilities that a mosquito completes the consecutive stages of the feeding cycle in one night, conditional on having reached each stage:
The entomological model in the AnophelesModel
package
+considers three classes of hosts (denoted with subscript i): humans
+protected by interventions, non-protected humans, and animal hosts. Each
+type of host determines specific transition probabilities between the
+consecutive stages of the mosquito feeding cycle (e.g., interventions
+such as nets will affect the probability of mosquito feeding on
+protected humans). The object host_ent_param
in the package
+database contains, in absence of interventions, for human and animal
+hosts, default probabilities that a mosquito completes the consecutive
+stages of the feeding cycle in one night, conditional on having reached
+each stage:
PBi
: Probability that a mosquito bites the hostPCi
: Probability that a mosquito finds a resting place after bitingPCi
: Probability that a mosquito finds a resting place
+after biting
PDi
: Probability that a mosquito survives the resting phasePDi
: Probability that a mosquito survives the resting
+phase
PEi
: Probability that a mosquito lays eggs and returns to host-seekingPEi
: Probability that a mosquito lays eggs and returns
+to host-seeking
Kvi
: Proportion of susceptible mosquitoes that become infected after bitingKvi
: Proportion of susceptible mosquitoes that become
+infected after biting
The values of the different probabilities in absence of interventions are those proposed by (Chitnis, Smith, and Steketee 2008) and (Briët et al. 2019). The host_ent_param
object can be directly used after loading the AnophelesModel
package:
The values of the different probabilities in absence of interventions
+are those proposed by (Chitnis, Smith, and
+Steketee 2008) and (Briët et al.
+2019). The host_ent_param
object can be directly
+used after loading the AnophelesModel
package:
# Print the object
host_ent_param
@@ -162,38 +243,56 @@ Host-specific entomological para
Mosquito bionomics
-The object vec_ent_param
contains bionomic parameterizations for 57 Anopheles mosquito species and 17 complexes (families of species). These parameters have been estimated using a Bayesian hierarchical model (Lemant et al, in preparation) accounting for the phylogeny of the Anopheles genus and informed by previously published entomological data (Massey et al. 2016), (Briët et al. 2019). Below, we provide an exhaustive list of these parameters, their names reflecting the notations used in (Chitnis, Smith, and Steketee 2008):
+The object vec_ent_param
contains bionomic
+parameterizations for 57 Anopheles mosquito species and 17
+complexes (families of species). These parameters have been estimated
+using a Bayesian hierarchical model (Lemant et al, in preparation)
+accounting for the phylogeny of the Anopheles genus and
+informed by previously published entomological data (Massey et al. 2016), (Briët et al. 2019). Below, we provide an
+exhaustive list of these parameters, their names reflecting the
+notations used in (Chitnis, Smith, and Steketee
+2008):
-
species_name
: name of the mosquito species
-
-
M
: parous rate (proportion of host seeking mosquitoes that have laid eggs at least once)
+M
: parous rate (proportion of host seeking mosquitoes
+that have laid eggs at least once)
-
M.sd
: standard deviation of the parous rate
-
-
Chi
: human blood index (proportion of mosquito blood meals obtained from humans)
+Chi
: human blood index (proportion of mosquito blood
+meals obtained from humans)
-
-
A0
: sac rate (proportion of mosquitoes who laid eggs the same day)
+A0
: sac rate (proportion of mosquitoes who laid eggs
+the same day)
-
A0.sd
: standard deviation of the sac rate
-
-
zeta.3
: relative availability of different non-human hosts
+zeta.3
: relative availability of different non-human
+hosts
-
-
td
: proportion of a day that a mosquito actively seeks a host
+td
: proportion of a day that a mosquito actively seeks
+a host
-
-
tau
: time required for a mosquito that has encountered a host to return to host seeking
+tau
: time required for a mosquito that has encountered
+a host to return to host seeking
-
-
ts
: duration of the extrinsic incubation period (time required for sporozoites to develop in mosquitoes)
+ts
: duration of the extrinsic incubation period (time
+required for sporozoites to develop in mosquitoes)
-
endophily
: proportion of indoor resting mosquitoes
-
-
endophily.sd
: standard deviation of the proportion of indoor resting mosquitoes
+endophily.sd
: standard deviation of the proportion of
+indoor resting mosquitoes
-
endophagy
: proportion of indoor feeding mosquitoes
-
-
endophagy.sd
: standard deviation of the proportion of indoor feeding mosquitoes
+endophagy.sd
: standard deviation of the proportion of
+indoor feeding mosquitoes
-The vec_ent_param
object is available upon loading the AnophelesModel
package and can be directly used:
+The vec_ent_param
object is available upon loading the
+AnophelesModel
package and can be directly used:
# print the first entries of the vec_ent_param object
head(vec_ent_param)
@@ -211,7 +310,8 @@ Mosquito bionomics#> 4 1 0.33 3 10 5 0.6944887 0.13455023 0.3439954 0.024569634
#> 5 1 0.33 3 10 5 0.6944887 0.13455023 0.3996990 0.042303792
#> 6 1 0.33 3 10 5 0.7743085 0.01233146 0.4920965 0.002755030
-For example, to retrieve the parameters for Anopheles albimanus:
+For example, to retrieve the parameters for Anopheles
+albimanus:
vec_ent_param[vec_ent_param$species_name == "Anopheles albimanus", ]
#> species_name M M.sd Chi A0 A0.sd
@@ -222,39 +322,55 @@ Mosquito bionomics
Human and mosquito activity patterns
-The table activity_patterns
contains mosquito biting patterns as well as human sleeping activity information extracted from (Sherrard-Smith et al. 2019) and (Briët et al. 2019). Each entry has the following attributes:
+The table activity_patterns
contains mosquito biting
+patterns as well as human sleeping activity information extracted from
+(Sherrard-Smith et al. 2019) and (Briët et al. 2019). Each entry has the
+following attributes:
-
id
: entry ID
-
-
species
: can be “Homo sapiens” when the entries reflect human activity, or names of mosquito species (e.g., “Anopheles gambiae”) for mosquito biting patterns
+species
: can be “Homo sapiens” when the entries reflect
+human activity, or names of mosquito species (e.g., “Anopheles gambiae”)
+for mosquito biting patterns
-
sampling
: can be one of the following:
-
-
IND
: for entries representing the proportion of humans indoors
+IND
: for entries representing the proportion of humans
+indoors
-
-
BED
: for entries representing the proportion of humans in bed
+BED
: for entries representing the proportion of humans
+in bed
-
-
HBI
: for entries representing the proportion of indoors human biting
+HBI
: for entries representing the proportion of indoors
+human biting
-
-
HBO
: for entries representing the proportion of outdoors human biting
+HBO
: for entries representing the proportion of
+outdoors human biting
-
-
ABO
: for entries representing the proportion of outdoors animal biting
+ABO
: for entries representing the proportion of
+outdoors animal biting
-
-
HB
: for entries corresponding to the proportion of human biting
+HB
: for entries corresponding to the proportion of
+human biting
country
: country where the measurements were taken
-site
: name of the geographical site where the measurements were taken
+site
: name of the geographical site where the
+measurements were taken
-hour
: hour of the day for which the sampling is reported, ranging from 4pm until 8am, format: hh:mm_hh:mm (e.g., 16:00_17:00)
+hour
: hour of the day for which the sampling is
+reported, ranging from 4pm until 8am, format: hh:mm_hh:mm (e.g.,
+16:00_17:00)
value
: measurement value
-The object can be directly examined and its components retrieved for various purposes. For example, to retrieve all the human activity patterns collected from Kenya:
+The object can be directly examined and its components retrieved for
+various purposes. For example, to retrieve all the human activity
+patterns collected from Kenya:
select_idx = activity_patterns$species == "Homo sapiens" &
activity_patterns$country == "Kenya"
@@ -267,7 +383,8 @@ Human and mosquito activity patter
#> 20 2 Homo sapiens IND Kenya Rachuonyo 19.00_20.00 1.0000000
#> 21 2 Homo sapiens IND Kenya Rachuonyo 20.00_21.00 1.0000000
#> 22 2 Homo sapiens IND Kenya Rachuonyo 21.00_22.00 1.0000000
-A pattern of interest can then be selected and displayed, for example:
+A pattern of interest can then be selected and displayed, for
+example:
library(ggplot2)
Rachuonyo_human_rhythms = Kenya_human_rhythms[which(Kenya_human_rhythms$id == 2),]
@@ -280,13 +397,21 @@ Human and mosquito activity patter
scale_x_discrete(name = "Time of the day (hh.mm)")+
guides(color = guide_legend(nrow = 2,byrow = TRUE)) +
labs(title = "Proportion of humans indoors in Rachuonyo, Kenya", fill="",
- x="Time", y="Activity")
+ x="Time", y="Activity")
+#> Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
+#> ℹ Please use `linewidth` instead.
+#> This warning is displayed once every 8 hours.
+#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
+#> generated.
-
Another example extracting all the available biting behavior for Anopheles gambiae in Kenya:
+Another example extracting all the available biting behavior for
+Anopheles gambiae in Kenya:
select_idx = activity_patterns$species == "Anopheles gambiae" &
activity_patterns$country == "Kenya"
@@ -303,29 +428,71 @@ Human and mosquito activity patter
Intervention parameters
-The AnophelesModel
package includes parameterisations for estimating the effects of various vector control interventions. These effects include reducing host availability, killing mosquitoes over time since spraying, insecticidal and deterrent effects as functions of insecticide content. The interventions modeled in the package consist of different types of long lasting insecticide treated nets (LLINs), indoor residual spraying (IRS), and house screening. All the parameters for calculating these effects are provided within the interventions_param
object which consists of three components, namely:
+The AnophelesModel
package includes parameterisations
+for estimating the effects of various vector control interventions.
+These effects include reducing host availability, killing mosquitoes
+over time since spraying, insecticidal and deterrent effects as
+functions of insecticide content. The interventions modeled in the
+package consist of different types of long lasting insecticide treated
+nets (LLINs), indoor residual spraying (IRS), and house screening. All
+the parameters for calculating these effects are provided within the
+interventions_param
object which consists of three
+components, namely:
-
-
interventions_param$interventions_summary
: an overview and general information for all available intervention parameterisations; this includes information about the active agent (insecticide) used, the mosquito species for which the effects were assessed in the experimental trials, the duration of the intervention and details about the method and references
+interventions_param$interventions_summary
: an overview
+and general information for all available intervention
+parameterisations; this includes information about the active agent
+(insecticide) used, the mosquito species for which the effects were
+assessed in the experimental trials, the duration of the intervention
+and details about the method and references
-
-
interventions_param$LLINs_params
: an object including parameterisations for various types of LLINs
+interventions_param$LLINs_params
: an object including
+parameterisations for various types of LLINs
-
-
interventions_param$IRS_params
: a table containing estimated insecticide decay for various types of IRS
+interventions_param$IRS_params
: a table containing
+estimated insecticide decay for various types of IRS
-The effects of LLINs are parameterized in terms of effectiveness in reducing the availability of humans, and both pre- and post-prandial killing of mosquitoes respectively. The effects are based on estimates from experimental hut studies from (Randriamaherijaona et al. 2015). The decay of these effects over time, in terms of attrition, use, physical and chemical integrity is parameterized through a series of logistic models described in (Briët et al. 2013), (Briët et al. 2019), and (Briet et al. 2020) using the data of President Malaria Initiative (PMI) net durability studies (7 countries, 8 net types, 23 combinations in all), and also from (Morgan et al. 2015). The object interventions_param$LLINs_params
contains all this information and is composed of three tables:
+The effects of LLINs are parameterized in terms of effectiveness in
+reducing the availability of humans, and both pre- and post-prandial
+killing of mosquitoes respectively. The effects are based on estimates
+from experimental hut studies from (Randriamaherijaona et al. 2015). The decay of
+these effects over time, in terms of attrition, use, physical and
+chemical integrity is parameterized through a series of logistic models
+described in (Briët et al. 2013), (Briët et al. 2019), and (Briet et al. 2020) using the data of President
+Malaria Initiative (PMI) net durability studies (7 countries, 8 net
+types, 23 combinations in all), and also from (Morgan et al. 2015). The object
+interventions_param$LLINs_params
contains all this
+information and is composed of three tables:
-
-
interventions_param$LLINs_params$model_coeff
: values for coefficients of regression models estimating LLINs effects; these models have been defined in (Briët et al. 2013), (Briët et al. 2019) and (Briet et al. 2020)
+interventions_param$LLINs_params$model_coeff
: values
+for coefficients of regression models estimating LLINs effects; these
+models have been defined in (Briët et al.
+2013), (Briët et al. 2019) and
+(Briet et al. 2020)
-
-
interventions_param$LLINs_params$insecticide_c
: insecticide content for various types of nets summarized in (Briet et al. 2020)
+interventions_param$LLINs_params$insecticide_c
:
+insecticide content for various types of nets summarized in (Briet et al. 2020)
-
-
interventions_param$LLINs_params$durability_estim
: information about the durability of LLINs (holed area, survival) across time in different geographical locations also summarized in (Briet et al. 2020).
+interventions_param$LLINs_params$durability_estim
:
+information about the durability of LLINs (holed area, survival) across
+time in different geographical locations also summarized in (Briet et al. 2020).
-Similarly, for IRS, a table with time series of effects in reducing human availability and killing of mosquitoes as well as parameters describing decay of effects over time is provided in interventions_param$IRS_params
.
-The parameterization for House screening is based on the estimates from (Kirby et al. 2009) and described in (Briët et al. 2019), assuming a house entry reduction of 59%.
-The data objects for interventions described above are directly accessible upon loading the AnophelesModel
package. For example, for obtaining an overview of all LLINs interventions provided with the AnophelesModel
package:
+Similarly, for IRS, a table with time series of effects in reducing
+human availability and killing of mosquitoes as well as parameters
+describing decay of effects over time is provided in
+interventions_param$IRS_params
.
+The parameterization for House screening is based on the estimates
+from (Kirby et al. 2009) and described in
+(Briët et al. 2019), assuming a house
+entry reduction of 59%.
+The data objects for interventions described above are directly
+accessible upon loading the AnophelesModel
package. For
+example, for obtaining an overview of all LLINs interventions provided
+with the AnophelesModel
package:
print(interventions_param$interventions_summary[which(interventions_param$interventions_summary$Intervention == "LLINs"),])
#> Parameterisation Intervention Active_agent Species
@@ -342,21 +509,33 @@ Intervention parameters
Functions querying the package database
-The package additionally contains helper functions for listing an overview of the different data objects to help the user populate the input arguments of the key functions in the general workflow (e.g., for the AnophelesModel()
function). These are:
+The package additionally contains helper functions for listing an
+overview of the different data objects to help the user populate the
+input arguments of the key functions in the general workflow (e.g., for
+the AnophelesModel()
function). These are:
-
-
list_all_species()
: prints all the mosquito species for which bionomic parameters are provided in the package database
+list_all_species()
: prints all the mosquito species for
+which bionomic parameters are provided in the package database
-
-
list_activity()
: prints all the available activity patterns
+list_activity()
: prints all the available activity
+patterns
-
-
list_interventions()
: prints the available vector control interventions
+list_interventions()
: prints the available vector
+control interventions
-
-
list_intervention_models()
: prints the available intervention parameterisation IDs
+list_intervention_models()
: prints the available
+intervention parameterisation IDs
-
-
get_net_types()
: prints the available net types and the countries where the studies have been conducted
+get_net_types()
: prints the available net types and the
+countries where the studies have been conducted
-Furthermore, the package allows extracting more specific information about the durability of different types of LLINs such as holed area, survival and decay. These parameteres were estimated in the PMI net durability studies.
-For example, to retrieve the decay characteristics for the DuraNet LLIN in Kenya:
+Furthermore, the package allows extracting more specific information
+about the durability of different types of LLINs such as holed area,
+survival and decay. These parameteres were estimated in the PMI net
+durability studies.
+For example, to retrieve the decay characteristics for the DuraNet
+LLIN in Kenya:
# load the necesary packages
library(reshape)
@@ -387,11 +566,19 @@ Functions querying the package
Estimating the impact of vector control interventions
-The mosquito bionomics, feeding cycle transitions, activity patterns and intervention effects accessible from the AnophelesModel
database can be used to parameterise the model of the mosquito feeding cycle and estimate the impact of interventions on the vectorial capacity.
+The mosquito bionomics, feeding cycle transitions, activity patterns
+and intervention effects accessible from the AnophelesModel
+database can be used to parameterise the model of the mosquito feeding
+cycle and estimate the impact of interventions on the vectorial
+capacity.
Step 1: Defining entomological parameters
-To define the mosquito specific entomological parameters in absence of interventions, the user can either select existing parameterisations from the AnophelesModel
database, or provide a set of custom values. For example, to choose an existing parameterisation for Anopheles nili:
+To define the mosquito specific entomological parameters in absence
+of interventions, the user can either select existing parameterisations
+from the AnophelesModel
database, or provide a set of
+custom values. For example, to choose an existing parameterisation for
+Anopheles nili:
nili_ent_params = def_vector_params(mosquito_species = "Anopheles nili")
head(nili_ent_params)
@@ -413,7 +600,9 @@ Step 1: Defining entomological
#>
#> $A0.sd
#> [1] 0.05195866
-To use a different parameterisation, first all the entomological parameter values need to be provided in a data frame with the same column names as the vec_ent_param
object:
+To use a different parameterisation, first all the entomological
+parameter values need to be provided in a data frame with the same
+column names as the vec_ent_param
object:
# Use own parameterisation
species_name = "Anopheles example"
@@ -434,7 +623,8 @@ Step 1: Defining entomological
custom_ent_params_table = as.data.frame(cbind.data.frame(species_name, M, M.sd, Chi,
A0, A0.sd, zeta.3, td,
tau, ts, to, endophily, endophily.sd, endophagy, endophagy.sd))
-Then, the data frame is provided to the function defining the vector parameters:
+Then, the data frame is provided to the function defining the vector
+parameters:
custom_ent_params = def_vector_params(mosquito_species = species_name, vector_table = custom_ent_params_table)
#> [1] "Object with vector entomological parameters defined using values provided by the user."
@@ -460,7 +650,13 @@ Step 1: Defining entomological
Step 2: Defining host-specific entomological parameters
-Objects for host-specific entomological parameters (e.g., biting of human versus animal hosts, for details or other parameters see section Host-specific entomological parameters) in absence of interventions can be defined in a similar way as for the mosquito bionomics. To choose the default parameterisation from (Chitnis, Smith, and Steketee 2008):
+Objects for host-specific entomological parameters (e.g., biting of
+human versus animal hosts, for details or other parameters see section
+Host-specific
+entomological parameters) in absence of interventions can be defined
+in a similar way as for the mosquito bionomics. To choose the default
+parameterisation from (Chitnis, Smith, and
+Steketee 2008):
default_host_params = def_host_params()
print(default_host_params)
@@ -484,7 +680,9 @@ Step 2: Defining
#>
#> $Kvi
#> [1] 0.03 0.00
-For using a different, custom parameterisation, first we need to build a data frame with the same structure as host_ent_params
:
+For using a different, custom parameterisation, first we need to
+build a data frame with the same structure as
+host_ent_params
:
species_name = "Anopheles example"
host = c("human", "animal")
@@ -494,7 +692,8 @@ Step 2: Defining
PEi = c(0.672, 0.214)
Kvi = c(0.52, 0.314)
custom_params_tab = cbind.data.frame(species_name, host, PBi, PCi, PDi, PEi, Kvi)
-Afterwards, we can provide this data frame to the relevant function for defining the host parameters:
+Afterwards, we can provide this data frame to the relevant function
+for defining the host parameters:
custom_host_params = def_host_params(mosquito_species = species_name, host_table = custom_params_tab)
#> [1] "Using host-specific entomological parameters provided by the user."
@@ -523,8 +722,16 @@ Step 2: Defining
Step 3: Defining mosquito and human activity patterns
-To facilitate definition of human and mosquito activity patterns, the AnophelesModel
package comes with inbuilt default values for Anopheles gambiae in Kenya and Anopheles albimanus in Haiti. The user can choose other patterns from the package database (344 entries) by using the entry ID of each time series (id
column of object activity_patterns
). Furthermore, customized patterns can be defined by directly providing the time series values. Here are some examples for these different use cases:
-To use default activity patterns from Kenya (human activity measured in the Rachuonyo and Rarieda districts):
+To facilitate definition of human and mosquito activity patterns, the
+AnophelesModel
package comes with inbuilt default values
+for Anopheles gambiae in Kenya and Anopheles albimanus
+in Haiti. The user can choose other patterns from the package database
+(344 entries) by using the entry ID of each time series (id
+column of object activity_patterns
). Furthermore,
+customized patterns can be defined by directly providing the time series
+values. Here are some examples for these different use cases:
+To use default activity patterns from Kenya (human activity measured
+in the Rachuonyo and Rarieda districts):
activity_p = def_activity_patterns(activity = "default_Anopheles_gambiae")
print(activity_p)
@@ -547,7 +754,8 @@ Step 3: Defining m
#> [1] 0.0000000 0.0000000 0.0000000 0.2271333 0.6666333 1.0000000 1.0000000
#> [8] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.8833167 0.2006667
#> [15] 0.0000000 0.0000000
-To select activity patterns from the database based on the entry IDs for Anopheles arabiensis in Kenya, Ahero disctrict:
+To select activity patterns from the database based on the entry IDs
+for Anopheles arabiensis in Kenya, Ahero disctrict:
activity_list = NULL
activity_list$HBI = 34
@@ -575,7 +783,9 @@ Step 3: Defining m
#> [1] 0.0000000 0.0000000 0.0000000 0.2271333 0.6666333 1.0000000 1.0000000
#> [8] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.8833167 0.2006667
#> [15] 0.0000000 0.0000000
-To use custom activity patterns by specifying the different time series, for example for An. albimanus in Haiti available from (Briët et al. 2019):
+To use custom activity patterns by specifying the different time
+series, for example for An. albimanus in Haiti available from
+(Briët et al. 2019):
# Briet et al 2019, Table S5. Biting rhythm of An. albimanus in Haiti, Dame Marie
HBI = c(0.22, 0.21, 0.22, 0.10, 0.13, 0.17, 0.08, 0.12, 0.03, 0.12, 0.17, 0.18, 0.25)
@@ -605,13 +815,20 @@ Step 3: Defining m
Step 4: Initializing the entomological model
-Once the vector, host and activity parameters have been defined, the entomological model can be initialized and calibrated accordingly. In this step, the death rate and the availability to mosquitoes for each host type are estimated. For a description of how these two parameters are estimated, see (Chitnis, Smith, and Steketee 2008).
-First, the sizes of the host and mosquito populations need to be defined:
+Once the vector, host and activity parameters have been defined, the
+entomological model can be initialized and calibrated accordingly. In
+this step, the death rate and the availability to mosquitoes for each
+host type are estimated. For a description of how these two parameters
+are estimated, see (Chitnis, Smith, and Steketee
+2008).
+First, the sizes of the host and mosquito populations need to be
+defined:
# Define size of the host and mosquito population
host_pop = 2000
vec_pop = 10000
-Then, to initialize the entomological model and build the model object:
+Then, to initialize the entomological model and build the model
+object:
model_params = build_model_obj(custom_ent_params, default_host_params, custom_activity_obj, host_pop)
# Print the calculated mosquito death rate
@@ -624,8 +841,17 @@ Step 4: Initializing the en
Step 5: Defining interventions effects
-In the AnophelesModel
package, the interventions and their characteristics are specified through a list of intervention objects. A detailed description of how the intervention objects are specified can be obtained by using the command ?def_interventions_effects
. To facilitate definition of these objects, the package contains a list of intervention object examples for each intervention type included in the intervention_obj_examples
list.
-The intervention_obj_examples
list contains three examples of interventions : LLIN, IRS and House screening, respectively:
+In the AnophelesModel
package, the interventions and
+their characteristics are specified through a list of intervention
+objects. A detailed description of how the intervention objects are
+specified can be obtained by using the command
+?def_interventions_effects
. To facilitate definition of
+these objects, the package contains a list of intervention object
+examples for each intervention type included in the
+intervention_obj_examples
list.
+The intervention_obj_examples
list contains three
+examples of interventions : LLIN, IRS and House screening,
+respectively:
print(intervention_obj_examples)
#> $LLINs_example
@@ -668,15 +894,30 @@ Step 5: Defining interventions ef
#>
#> $Screening_example$parameterisation
#> [1] "Screening01"
-Except for the house screening where only the id
and description
attributes are required, to use the IRS and LLIN interventions included in the package, the user needs to provide the parameterisation ID (e.g., LLINs01, IRS01). A list of all package intervention parameterisations and their IDs can be obtained with the list_intervention_models()
command. The examples from intervention_obj_examples
can be adapted to the user’s needs to pick other available parameterisations and intervention characteristics available within the package. For example, to select a different IRS parameterisation, we can modify the parameterisation
attribute of the IRS example:
+Except for the house screening where only the id
and
+description
attributes are required, to use the IRS and
+LLIN interventions included in the package, the user needs to provide
+the parameterisation ID (e.g., LLINs01, IRS01). A list of all package
+intervention parameterisations and their IDs can be obtained with the
+list_intervention_models()
command. The examples from
+intervention_obj_examples
can be adapted to the user’s
+needs to pick other available parameterisations and intervention
+characteristics available within the package. For example, to select a
+different IRS parameterisation, we can modify the
+parameterisation
attribute of the IRS example:
new_IRS = intervention_obj_examples$IRS_example
new_IRS$description = "Permethrin IRS"
new_IRS$parameterisation = "IRS16"
-then we can concatenate the new intervention object to the list with intervention examples:
+then we can concatenate the new intervention object to the list with
+intervention examples:
-Once the intervention parameterisations have been defined, the user needs to specify the intervention deployment coverages and a number of time points. The duration of each intervention will be evenly split across the time points and the intervention effects will be calculated at each time point.
+Once the intervention parameterisations have been defined, the user
+needs to specify the intervention deployment coverages and a number of
+time points. The duration of each intervention will be evenly split
+across the time points and the intervention effects will be calculated
+at each time point.
list_interv = new_intervention_list
coverages = c(seq(0, 1, by = 0.1))
@@ -689,22 +930,24 @@ Step 5: Defining interventions ef
#> [1] "Using intervention effects available for model IRS12"
#> [1] "IRS"
#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
-#> c(0.041666667, : some 'x' values beyond boundary knots may cause ill-conditioned
-#> bases
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
-#> c(0.041666667, : some 'x' values beyond boundary knots may cause ill-conditioned
-#> bases
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
-#> c(0.041666667, : some 'x' values beyond boundary knots may cause ill-conditioned
-#> bases
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
#> [1] "Defining intervention effects for House_screening"
#> [1] "Using intervention effects available for model Screening01"
#> [1] "Defining intervention effects for IRS"
#> [1] "Using intervention effects available for model IRS16"
#> [1] "IRS"
-The effects of the interventions are adjusted according to indoor and outdoor human exposure to mosquitoes. The user can calculate the human exposure parameters using the following function:
+The effects of the interventions are adjusted according to indoor and
+outdoor human exposure to mosquitoes. The user can calculate the human
+exposure parameters using the following function:
in_out_exp = get_in_out_exp(activity_cycles = custom_activity_obj, vec_p = custom_ent_params)
print(in_out_exp)
@@ -726,11 +969,15 @@ Step 5: Defining interventions ef
Step 6: Calculating intervention impact on vectorial capacity
-Once all the intervention effects have been defined, their impact on the vectorial capacity can be estimated (using equation 20 from (Chitnis, Smith, and Steketee 2008)) :
+Once all the intervention effects have been defined, their impact on
+the vectorial capacity can be estimated (using equation 20 from (Chitnis, Smith, and Steketee 2008)) :
impacts = calculate_impact(intervention_vec, coverages, model_params,
vec_pop, n_ip)
-The resulting vectorial capacity is calculated and aggregated across the previously-specified time points which are uniformly-distributed across the duration of an intervention. To display the average vectorial capacity for various coverages:
+The resulting vectorial capacity is calculated and aggregated across
+the previously-specified time points which are uniformly-distributed
+across the duration of an intervention. To display the average vectorial
+capacity for various coverages:
p = plot_impact_species(impacts, "VC_red")
plot(p)
@@ -739,17 +986,154 @@ Step 6: Ca
Impact of interventions on vectorial capacity.
-
The variability in the entomological parameters for each mosquito species can be accounted for when calculating the impact of interventions on the vectorial capacity. To do so, the standard deviation values of the entomological parameters (namely parameters M.sd
, A0.sd
, endophily.sd
and endophagy.sd
in the vec_ent_param
object) are used to create a confidence interval defined as the mean value +/- two standard deviations. Using latin hypercube sampling (Stein 1987), a set of samples are uniformly drawn from the multi-dimensional parameter space defined by the confidence intervals. Then, the average vectorial capacity is computed for each of these samples and the resulting confidence interval for the vectorial capacity is represented by the mean value +/- two standard deviations. This sampling-based approach is included in the calculate_impact_var()
function to estimate the confidence interval for the reported mean vectorial capacity. In the example below, in the interest of execution time, only 10 samples have been used to estimate the confidence intervals of the vectorial capacity:
+The variability in the entomological parameters for each mosquito
+species can be accounted for when calculating the impact of
+interventions on the vectorial capacity. To do so, the standard
+deviation values of the entomological parameters (namely parameters
+M.sd
, A0.sd
, endophily.sd
and
+endophagy.sd
in the vec_ent_param
object) are
+used to create a confidence interval defined as the mean value +/- two
+standard deviations. Using latin hypercube sampling (Stein 1987), a set of samples are uniformly
+drawn from the multi-dimensional parameter space defined by the
+confidence intervals. Then, the average vectorial capacity is computed
+for each of these samples and the resulting confidence interval for the
+vectorial capacity is represented by the mean value +/- two standard
+deviations. This sampling-based approach is included in the
+calculate_impact_var()
function to estimate the confidence
+interval for the reported mean vectorial capacity. In the example below,
+in the interest of execution time, only 10 samples have been used to
+estimate the confidence intervals of the vectorial capacity:
impact_gambiae = calculate_impact_var(mosquito_species = "Anopheles gambiae",
activity_patterns = "default_Anopheles_gambiae",
- interventions = intervention_vec,
+ interventions = intervention_obj_examples,
n_sample_points = 10,
plot_result = FALSE)
+#> [1] "IRS"
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+#> [1] "IRS"
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+#> [1] "IRS"
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+#> [1] "IRS"
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+#> [1] "IRS"
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+#> [1] "IRS"
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+#> [1] "IRS"
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+#> [1] "IRS"
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+#> [1] "IRS"
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+#> [1] "IRS"
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
+
+#> Warning in bs(input_times, degree = 3L, knots = numeric(0), Boundary.knots =
+#> c(0.041666667, : some 'x' values beyond boundary knots may cause
+#> ill-conditioned bases
plot_impact_var("Anopheles gambiae", impact_gambiae)
@@ -757,14 +1141,24 @@ Step 6: Ca
Generating vector parameterisations for OpenMalaria
-The package AnophelesModel
can be used to create XML snippets containing parameterisations for the entomology and generic vector control interventions (GVI) components of OpenMalaria experiments. These snippets can then be incorporated in the base XML files describing the setup for OpenMalaria individual-based simulations. There are two main categories of XML snippets that can be generated with the package:
+The package AnophelesModel
can be used to create XML
+snippets containing parameterisations for the entomology and generic
+vector control interventions (GVI) components of OpenMalaria
+experiments. These snippets can then be incorporated in the base XML
+files describing the setup for OpenMalaria individual-based simulations.
+There are two main categories of XML snippets that can be generated with
+the package:
-
-
<mosq>
and <nonHumanHosts>
snippets containing entomological parameters
+<mosq>
and <nonHumanHosts>
+snippets containing entomological parameters
-
-
<GVI>
snippets with parameters describing the effects of interventions
+<GVI>
snippets with parameters describing the
+effects of interventions
-For example, to generate the <mosq>
and <nonHumanHosts>
snippets for Anopheles nili:
+For example, to generate the <mosq>
and
+<nonHumanHosts>
snippets for Anopheles
+nili:
entomology_xml = get_OM_ento_snippet(nili_ent_params, default_host_params)
print(entomology_xml)
@@ -790,7 +1184,14 @@ Generating vector p
#> <mosqProbFindRestSite value="0.95"/>
#> <mosqProbResting value="0.99"/>
#> </nonHumanHosts>
-To generate the <GVI>
snippets with deterrency, pre- and post-prandial effects of interventions, a set of 7 decay functions are fitted to the time series with intervention effects calculated previously with def_interventions_effects()
and the best fit is chosen. The package also produces visualizations of the different decay fits. For a detailed description of the fitted decay functions, check the description in the OpenMalaria wiki.
+To generate the <GVI>
snippets with deterrency,
+pre- and post-prandial effects of interventions, a set of 7 decay
+functions are fitted to the time series with intervention effects
+calculated previously with def_interventions_effects()
and
+the best fit is chosen. The package also produces visualizations of the
+different decay fits. For a detailed description of the fitted decay
+functions, check the description
+in the OpenMalaria wiki.
GVI_snippets = get_OM_GVI_snippet("Anopheles example", impacts$interventions_vec$LLINs_example,
@@ -854,37 +1255,80 @@ References
-Briet, Olivier, Hannah Koenker, Laura Norris, Ryan Wiegand, Jodi Vanden Eng, Alex Thackeray, John Williamson, et al. 2020. “Attrition, Physical Integrity and Insecticidal Activity of Long-Lasting Insecticidal Nets in Sub-Saharan Africa and Modelling of Their Impact on Vectorial Capacity.” Malaria Journal 19 (1): 1–15.
+Briet, Olivier, Hannah Koenker, Laura Norris, Ryan Wiegand, Jodi Vanden
+Eng, Alex Thackeray, John Williamson, et al. 2020. “Attrition,
+Physical Integrity and Insecticidal Activity of Long-Lasting
+Insecticidal Nets in Sub-Saharan Africa and Modelling of Their Impact on
+Vectorial Capacity.” Malaria Journal 19 (1): 1–15.
-Briët, Olivier JT, Daniel E Impoinvil, Nakul Chitnis, Emilie Pothin, Jean Frantz Lemoine, Joseph Frederic, and Thomas A Smith. 2019. “Models of Effectiveness of Interventions Against Malaria Transmitted by Anopheles Albimanus.” Malaria Journal 18 (1): 263.
+Briët, Olivier JT, Daniel E Impoinvil, Nakul Chitnis, Emilie Pothin,
+Jean Frantz Lemoine, Joseph Frederic, and Thomas A Smith. 2019.
+“Models of Effectiveness of Interventions Against Malaria
+Transmitted by Anopheles Albimanus.” Malaria Journal 18
+(1): 263.
-Briët, Olivier JT, Melissa A Penny, Diggory Hardy, Taiwo S Awolola, Wim Van Bortel, Vincent Corbel, Roch K Dabiré, et al. 2013. “Effects of Pyrethroid Resistance on the Cost Effectiveness of a Mass Distribution of Long-Lasting Insecticidal Nets: A Modelling Study.” Malaria Journal 12 (1): 1–12.
+Briët, Olivier JT, Melissa A Penny, Diggory Hardy, Taiwo S Awolola, Wim
+Van Bortel, Vincent Corbel, Roch K Dabiré, et al. 2013. “Effects
+of Pyrethroid Resistance on the Cost Effectiveness of a Mass
+Distribution of Long-Lasting Insecticidal Nets: A Modelling
+Study.” Malaria Journal 12 (1): 1–12.
-Chitnis, Nakul, Thomas Smith, and Richard Steketee. 2008. “A Mathematical Model for the Dynamics of Malaria in Mosquitoes Feeding on a Heterogeneous Host Population.” Journal of Biological Dynamics 2 (3): 259–85. https://doi.org/10.1080/17513750701769857.
+Chitnis, Nakul, Thomas Smith, and Richard Steketee. 2008. “A
+Mathematical Model for the Dynamics of Malaria in Mosquitoes Feeding on
+a Heterogeneous Host Population.” Journal of Biological
+Dynamics 2 (3): 259–85. https://doi.org/10.1080/17513750701769857.
-Kirby, Matthew J, David Ameh, Christian Bottomley, Clare Green, Musa Jawara, Paul J Milligan, Paul C Snell, David J Conway, and Steve W Lindsay. 2009. “Effect of Two Different House Screening Interventions on Exposure to Malaria Vectors and on Anaemia in Children in the Gambia: A Randomised Controlled Trial.” The Lancet 374 (9694): 998–1009.
+Kirby, Matthew J, David Ameh, Christian Bottomley, Clare Green, Musa
+Jawara, Paul J Milligan, Paul C Snell, David J Conway, and Steve W
+Lindsay. 2009. “Effect of Two Different House Screening
+Interventions on Exposure to Malaria Vectors and on Anaemia in Children
+in the Gambia: A Randomised Controlled Trial.” The
+Lancet 374 (9694): 998–1009.
-Massey, N Claire, Gala Garrod, Antoinette Wiebe, Andrew J Henry, Zhi Huang, Catherine L Moyes, and Marianne E Sinka. 2016. “A global bionomic database for the dominant vectors of human malaria.” Scientific Data 3 (1): 160014. https://doi.org/10.1038/sdata.2016.14.
+Massey, N Claire, Gala Garrod, Antoinette Wiebe, Andrew J Henry, Zhi
+Huang, Catherine L Moyes, and Marianne E Sinka. 2016. “A global bionomic database for the dominant vectors of
+human malaria.” Scientific Data 3 (1): 160014. https://doi.org/10.1038/sdata.2016.14.
-Morgan, Juliette, Ana Paula Abı́lio, Maria do Rosario Pondja, Dulcisária Marrenjo, Jacinta Luciano, Guilhermina Fernandes, Samira Sabindy, et al. 2015. “Physical Durability of Two Types of Long-Lasting Insecticidal Nets (LLINs) Three Years After a Mass LLIN Distribution Campaign in Mozambique, 2008–2011.” The American Journal of Tropical Medicine and Hygiene 92 (2): 286.
+Morgan, Juliette, Ana Paula Abı́lio, Maria do Rosario Pondja, Dulcisária
+Marrenjo, Jacinta Luciano, Guilhermina Fernandes, Samira Sabindy, et al.
+2015. “Physical Durability of Two Types of Long-Lasting
+Insecticidal Nets (LLINs) Three Years After a Mass LLIN Distribution
+Campaign in Mozambique, 2008–2011.” The American Journal of
+Tropical Medicine and Hygiene 92 (2): 286.
-Randriamaherijaona, Sanjiarizaha, Olivier JT Briët, Sébastien Boyer, Aziz Bouraima, Raphael N’Guessan, Christophe Rogier, and Vincent Corbel. 2015. “Do Holes in Long-Lasting Insecticidal Nets Compromise Their Efficacy Against Pyrethroid Resistant Anopheles Gambiae and Culex Quinquefasciatus? Results from a Release–Recapture Study in Experimental Huts.” Malaria Journal 14 (1): 1–22.
+Randriamaherijaona, Sanjiarizaha, Olivier JT Briët, Sébastien Boyer,
+Aziz Bouraima, Raphael N’Guessan, Christophe Rogier, and Vincent Corbel.
+2015. “Do Holes in Long-Lasting Insecticidal Nets Compromise Their
+Efficacy Against Pyrethroid Resistant Anopheles Gambiae and Culex
+Quinquefasciatus? Results from a Release–Recapture Study in Experimental
+Huts.” Malaria Journal 14 (1): 1–22.
-Sherrard-Smith, Ellie, Janetta E. Skarp, Andrew D. Beale, Christen Fornadel, Laura C. Norris, Sarah J. Moore, Selam Mihreteab, et al. 2019. “Mosquito Feeding Behavior and How It Influences Residual Malaria Transmission Across Africa.” Proceedings of the National Academy of Sciences 116 (30): 15086–95. https://doi.org/10.1073/pnas.1820646116.
+Sherrard-Smith, Ellie, Janetta E. Skarp, Andrew D. Beale, Christen
+Fornadel, Laura C. Norris, Sarah J. Moore, Selam Mihreteab, et al. 2019.
+“Mosquito Feeding Behavior and How It Influences Residual Malaria
+Transmission Across Africa.” Proceedings of the National
+Academy of Sciences 116 (30): 15086–95. https://doi.org/10.1073/pnas.1820646116.
-Smith, Thomas, Gerry F Killeen, Nicolas Maire, Amanda Ross, Louis Molineaux, Fabrizio Tediosi, Guy Hutton, Jurg Utzinger, Klaus Dietz, and Marcel Tanner. 2006. “Mathematical Modeling of the Impact of Malaria Vaccines on the Clinical Epidemiology and Natural History of Plasmodium Falciparum Malaria: Overview.” The American Journal of Tropical Medicine and Hygiene 75 (2_suppl): 1–10.
+Smith, Thomas, Gerry F Killeen, Nicolas Maire, Amanda Ross, Louis
+Molineaux, Fabrizio Tediosi, Guy Hutton, Jurg Utzinger, Klaus Dietz, and
+Marcel Tanner. 2006. “Mathematical Modeling of the Impact of
+Malaria Vaccines on the Clinical Epidemiology and Natural History of
+Plasmodium Falciparum Malaria: Overview.” The American
+Journal of Tropical Medicine and Hygiene 75 (2_suppl): 1–10.
-Stein, Michael. 1987. “Large Sample Properties of Simulations Using Latin Hypercube Sampling.” Technometrics 29 (2): 143–51.
+Stein, Michael. 1987. “Large Sample Properties of Simulations
+Using Latin Hypercube Sampling.” Technometrics 29 (2):
+143–51.
@@ -907,7 +1351,7 @@ References
-Site built with pkgdown 2.0.6.
+Site built with pkgdown 2.0.7.
diff --git a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-12-1.png b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-12-1.png
index 32a89ab..0b115ee 100644
Binary files a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-12-1.png and b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-12-1.png differ
diff --git a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-12-2.png b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-12-2.png
index 44d8dbb..353fa5e 100644
Binary files a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-12-2.png and b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-12-2.png differ
diff --git a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-12-3.png b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-12-3.png
index 8615eac..1cec0db 100644
Binary files a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-12-3.png and b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-12-3.png differ
diff --git a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-3-1.png b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-3-1.png
index 2a38d77..e7ceb8a 100644
Binary files a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-3-1.png and b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-3-1.png differ
diff --git a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-30-1.png b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-30-1.png
index 683b0bb..53eda1c 100644
Binary files a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-30-1.png and b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-30-1.png differ
diff --git a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-31-1.png b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-31-1.png
index c5d3268..9e6d16b 100644
Binary files a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-31-1.png and b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-31-1.png differ
diff --git a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-33-1.png b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-33-1.png
index 469de2e..3bac457 100644
Binary files a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-33-1.png and b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-33-1.png differ
diff --git a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-33-2.png b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-33-2.png
index 9464fa1..1de32e2 100644
Binary files a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-33-2.png and b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-33-2.png differ
diff --git a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-33-3.png b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-33-3.png
index 3ea78f7..5980602 100644
Binary files a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-33-3.png and b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-33-3.png differ
diff --git a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-8-1.png b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-8-1.png
index 3ec5908..13ea547 100644
Binary files a/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-8-1.png and b/docs/articles/AnophelesModel_files/figure-html/unnamed-chunk-8-1.png differ
diff --git a/docs/articles/AnophelesModel_files/grViz-binding-1.0.10/grViz.js b/docs/articles/AnophelesModel_files/grViz-binding-1.0.10/grViz.js
new file mode 100644
index 0000000..f801317
--- /dev/null
+++ b/docs/articles/AnophelesModel_files/grViz-binding-1.0.10/grViz.js
@@ -0,0 +1,91 @@
+HTMLWidgets.widget({
+
+ name: 'grViz',
+
+ type: 'output',
+
+ initialize: function(el, width, height) {
+
+ return {
+ // TODO: add instance fields as required
+ };
+ },
+
+ renderValue: function(el, x, instance) {
+ // Use this to sort of make our diagram responsive
+ // or at a minimum fit within the bounds set by htmlwidgets
+ // for the parent container
+ function makeResponsive(el){
+ var svg = el.getElementsByTagName("svg")[0];
+ if (svg) {
+ if (svg.width) {svg.removeAttribute("width")}
+ if (svg.height) {svg.removeAttribute("height")}
+ svg.style.width = "100%";
+ svg.style.height = "100%";
+ }
+ }
+
+ if (x.diagram !== "") {
+
+ if (typeof x.config === "undefined"){
+ x.config = {};
+ x.config.engine = "dot";
+ x.config.options = {};
+ }
+
+ try {
+
+ el.innerHTML = Viz(x.diagram, format="svg", engine=x.config.engine, options=x.config.options);
+
+ makeResponsive(el);
+
+ if (HTMLWidgets.shinyMode) {
+ // Get widget id
+ var id = el.id;
+
+ $("#" + id + " .node").click(function(e) {
+ // Get node id
+ var nodeid = e.currentTarget.id;
+ // Get node text object and make an array
+ var node_texts = $("#" + id + " #" + nodeid + " text");
+ //var node_path = $("#" + nodeid + " path")[0];
+ var text_array = node_texts.map(function() {return $(this).text(); }).toArray();
+ // Build return object *obj* with node-id, node text values and node fill
+ var obj = {
+ id: nodeid,
+ //fill: node_path.attributes.fill.nodeValue,
+ //outerHMTL: node_path.outerHTML,
+ nodeValues: text_array
+ };
+ // Send *obj* to Shiny's inputs (input$[id]+_click e.g.: input$vtree_click))
+ Shiny.setInputValue(id + "_click", obj, {priority: "event"});
+ });
+ }
+
+ // set up a container for tasks to perform after completion
+ // one example would be add callbacks for event handling
+ // styling
+ if (typeof x.tasks !== "undefined") {
+ if ((typeof x.tasks.length === "undefined") ||
+ (typeof x.tasks === "function")) {
+ // handle a function not enclosed in array
+ // should be able to remove once using jsonlite
+ x.tasks = [x.tasks];
+ }
+ x.tasks.map(function(t){
+ // for each tasks add it to the mermaid.tasks with el
+ t.call(el);
+ });
+ }
+ } catch(e){
+ var p = document.createElement("pre");
+ p.innerText = e;
+ el.appendChild(p);
+ }
+ }
+
+ },
+
+ resize: function(el, width, height, instance) {
+ }
+});
diff --git a/docs/articles/AnophelesModel_files/htmlwidgets-1.6.2/htmlwidgets.js b/docs/articles/AnophelesModel_files/htmlwidgets-1.6.2/htmlwidgets.js
new file mode 100644
index 0000000..1067d02
--- /dev/null
+++ b/docs/articles/AnophelesModel_files/htmlwidgets-1.6.2/htmlwidgets.js
@@ -0,0 +1,901 @@
+(function() {
+ // If window.HTMLWidgets is already defined, then use it; otherwise create a
+ // new object. This allows preceding code to set options that affect the
+ // initialization process (though none currently exist).
+ window.HTMLWidgets = window.HTMLWidgets || {};
+
+ // See if we're running in a viewer pane. If not, we're in a web browser.
+ var viewerMode = window.HTMLWidgets.viewerMode =
+ /\bviewer_pane=1\b/.test(window.location);
+
+ // See if we're running in Shiny mode. If not, it's a static document.
+ // Note that static widgets can appear in both Shiny and static modes, but
+ // obviously, Shiny widgets can only appear in Shiny apps/documents.
+ var shinyMode = window.HTMLWidgets.shinyMode =
+ typeof(window.Shiny) !== "undefined" && !!window.Shiny.outputBindings;
+
+ // We can't count on jQuery being available, so we implement our own
+ // version if necessary.
+ function querySelectorAll(scope, selector) {
+ if (typeof(jQuery) !== "undefined" && scope instanceof jQuery) {
+ return scope.find(selector);
+ }
+ if (scope.querySelectorAll) {
+ return scope.querySelectorAll(selector);
+ }
+ }
+
+ function asArray(value) {
+ if (value === null)
+ return [];
+ if ($.isArray(value))
+ return value;
+ return [value];
+ }
+
+ // Implement jQuery's extend
+ function extend(target /*, ... */) {
+ if (arguments.length == 1) {
+ return target;
+ }
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+ for (var prop in source) {
+ if (source.hasOwnProperty(prop)) {
+ target[prop] = source[prop];
+ }
+ }
+ }
+ return target;
+ }
+
+ // IE8 doesn't support Array.forEach.
+ function forEach(values, callback, thisArg) {
+ if (values.forEach) {
+ values.forEach(callback, thisArg);
+ } else {
+ for (var i = 0; i < values.length; i++) {
+ callback.call(thisArg, values[i], i, values);
+ }
+ }
+ }
+
+ // Replaces the specified method with the return value of funcSource.
+ //
+ // Note that funcSource should not BE the new method, it should be a function
+ // that RETURNS the new method. funcSource receives a single argument that is
+ // the overridden method, it can be called from the new method. The overridden
+ // method can be called like a regular function, it has the target permanently
+ // bound to it so "this" will work correctly.
+ function overrideMethod(target, methodName, funcSource) {
+ var superFunc = target[methodName] || function() {};
+ var superFuncBound = function() {
+ return superFunc.apply(target, arguments);
+ };
+ target[methodName] = funcSource(superFuncBound);
+ }
+
+ // Add a method to delegator that, when invoked, calls
+ // delegatee.methodName. If there is no such method on
+ // the delegatee, but there was one on delegator before
+ // delegateMethod was called, then the original version
+ // is invoked instead.
+ // For example:
+ //
+ // var a = {
+ // method1: function() { console.log('a1'); }
+ // method2: function() { console.log('a2'); }
+ // };
+ // var b = {
+ // method1: function() { console.log('b1'); }
+ // };
+ // delegateMethod(a, b, "method1");
+ // delegateMethod(a, b, "method2");
+ // a.method1();
+ // a.method2();
+ //
+ // The output would be "b1", "a2".
+ function delegateMethod(delegator, delegatee, methodName) {
+ var inherited = delegator[methodName];
+ delegator[methodName] = function() {
+ var target = delegatee;
+ var method = delegatee[methodName];
+
+ // The method doesn't exist on the delegatee. Instead,
+ // call the method on the delegator, if it exists.
+ if (!method) {
+ target = delegator;
+ method = inherited;
+ }
+
+ if (method) {
+ return method.apply(target, arguments);
+ }
+ };
+ }
+
+ // Implement a vague facsimilie of jQuery's data method
+ function elementData(el, name, value) {
+ if (arguments.length == 2) {
+ return el["htmlwidget_data_" + name];
+ } else if (arguments.length == 3) {
+ el["htmlwidget_data_" + name] = value;
+ return el;
+ } else {
+ throw new Error("Wrong number of arguments for elementData: " +
+ arguments.length);
+ }
+ }
+
+ // http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
+ function escapeRegExp(str) {
+ return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
+ }
+
+ function hasClass(el, className) {
+ var re = new RegExp("\\b" + escapeRegExp(className) + "\\b");
+ return re.test(el.className);
+ }
+
+ // elements - array (or array-like object) of HTML elements
+ // className - class name to test for
+ // include - if true, only return elements with given className;
+ // if false, only return elements *without* given className
+ function filterByClass(elements, className, include) {
+ var results = [];
+ for (var i = 0; i < elements.length; i++) {
+ if (hasClass(elements[i], className) == include)
+ results.push(elements[i]);
+ }
+ return results;
+ }
+
+ function on(obj, eventName, func) {
+ if (obj.addEventListener) {
+ obj.addEventListener(eventName, func, false);
+ } else if (obj.attachEvent) {
+ obj.attachEvent(eventName, func);
+ }
+ }
+
+ function off(obj, eventName, func) {
+ if (obj.removeEventListener)
+ obj.removeEventListener(eventName, func, false);
+ else if (obj.detachEvent) {
+ obj.detachEvent(eventName, func);
+ }
+ }
+
+ // Translate array of values to top/right/bottom/left, as usual with
+ // the "padding" CSS property
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/padding
+ function unpackPadding(value) {
+ if (typeof(value) === "number")
+ value = [value];
+ if (value.length === 1) {
+ return {top: value[0], right: value[0], bottom: value[0], left: value[0]};
+ }
+ if (value.length === 2) {
+ return {top: value[0], right: value[1], bottom: value[0], left: value[1]};
+ }
+ if (value.length === 3) {
+ return {top: value[0], right: value[1], bottom: value[2], left: value[1]};
+ }
+ if (value.length === 4) {
+ return {top: value[0], right: value[1], bottom: value[2], left: value[3]};
+ }
+ }
+
+ // Convert an unpacked padding object to a CSS value
+ function paddingToCss(paddingObj) {
+ return paddingObj.top + "px " + paddingObj.right + "px " + paddingObj.bottom + "px " + paddingObj.left + "px";
+ }
+
+ // Makes a number suitable for CSS
+ function px(x) {
+ if (typeof(x) === "number")
+ return x + "px";
+ else
+ return x;
+ }
+
+ // Retrieves runtime widget sizing information for an element.
+ // The return value is either null, or an object with fill, padding,
+ // defaultWidth, defaultHeight fields.
+ function sizingPolicy(el) {
+ var sizingEl = document.querySelector("script[data-for='" + el.id + "'][type='application/htmlwidget-sizing']");
+ if (!sizingEl)
+ return null;
+ var sp = JSON.parse(sizingEl.textContent || sizingEl.text || "{}");
+ if (viewerMode) {
+ return sp.viewer;
+ } else {
+ return sp.browser;
+ }
+ }
+
+ // @param tasks Array of strings (or falsy value, in which case no-op).
+ // Each element must be a valid JavaScript expression that yields a
+ // function. Or, can be an array of objects with "code" and "data"
+ // properties; in this case, the "code" property should be a string
+ // of JS that's an expr that yields a function, and "data" should be
+ // an object that will be added as an additional argument when that
+ // function is called.
+ // @param target The object that will be "this" for each function
+ // execution.
+ // @param args Array of arguments to be passed to the functions. (The
+ // same arguments will be passed to all functions.)
+ function evalAndRun(tasks, target, args) {
+ if (tasks) {
+ forEach(tasks, function(task) {
+ var theseArgs = args;
+ if (typeof(task) === "object") {
+ theseArgs = theseArgs.concat([task.data]);
+ task = task.code;
+ }
+ var taskFunc = tryEval(task);
+ if (typeof(taskFunc) !== "function") {
+ throw new Error("Task must be a function! Source:\n" + task);
+ }
+ taskFunc.apply(target, theseArgs);
+ });
+ }
+ }
+
+ // Attempt eval() both with and without enclosing in parentheses.
+ // Note that enclosing coerces a function declaration into
+ // an expression that eval() can parse
+ // (otherwise, a SyntaxError is thrown)
+ function tryEval(code) {
+ var result = null;
+ try {
+ result = eval("(" + code + ")");
+ } catch(error) {
+ if (!(error instanceof SyntaxError)) {
+ throw error;
+ }
+ try {
+ result = eval(code);
+ } catch(e) {
+ if (e instanceof SyntaxError) {
+ throw error;
+ } else {
+ throw e;
+ }
+ }
+ }
+ return result;
+ }
+
+ function initSizing(el) {
+ var sizing = sizingPolicy(el);
+ if (!sizing)
+ return;
+
+ var cel = document.getElementById("htmlwidget_container");
+ if (!cel)
+ return;
+
+ if (typeof(sizing.padding) !== "undefined") {
+ document.body.style.margin = "0";
+ document.body.style.padding = paddingToCss(unpackPadding(sizing.padding));
+ }
+
+ if (sizing.fill) {
+ document.body.style.overflow = "hidden";
+ document.body.style.width = "100%";
+ document.body.style.height = "100%";
+ document.documentElement.style.width = "100%";
+ document.documentElement.style.height = "100%";
+ cel.style.position = "absolute";
+ var pad = unpackPadding(sizing.padding);
+ cel.style.top = pad.top + "px";
+ cel.style.right = pad.right + "px";
+ cel.style.bottom = pad.bottom + "px";
+ cel.style.left = pad.left + "px";
+ el.style.width = "100%";
+ el.style.height = "100%";
+
+ return {
+ getWidth: function() { return cel.getBoundingClientRect().width; },
+ getHeight: function() { return cel.getBoundingClientRect().height; }
+ };
+
+ } else {
+ el.style.width = px(sizing.width);
+ el.style.height = px(sizing.height);
+
+ return {
+ getWidth: function() { return cel.getBoundingClientRect().width; },
+ getHeight: function() { return cel.getBoundingClientRect().height; }
+ };
+ }
+ }
+
+ // Default implementations for methods
+ var defaults = {
+ find: function(scope) {
+ return querySelectorAll(scope, "." + this.name);
+ },
+ renderError: function(el, err) {
+ var $el = $(el);
+
+ this.clearError(el);
+
+ // Add all these error classes, as Shiny does
+ var errClass = "shiny-output-error";
+ if (err.type !== null) {
+ // use the classes of the error condition as CSS class names
+ errClass = errClass + " " + $.map(asArray(err.type), function(type) {
+ return errClass + "-" + type;
+ }).join(" ");
+ }
+ errClass = errClass + " htmlwidgets-error";
+
+ // Is el inline or block? If inline or inline-block, just display:none it
+ // and add an inline error.
+ var display = $el.css("display");
+ $el.data("restore-display-mode", display);
+
+ if (display === "inline" || display === "inline-block") {
+ $el.hide();
+ if (err.message !== "") {
+ var errorSpan = $("").addClass(errClass);
+ errorSpan.text(err.message);
+ $el.after(errorSpan);
+ }
+ } else if (display === "block") {
+ // If block, add an error just after the el, set visibility:none on the
+ // el, and position the error to be on top of the el.
+ // Mark it with a unique ID and CSS class so we can remove it later.
+ $el.css("visibility", "hidden");
+ if (err.message !== "") {
+ var errorDiv = $("").addClass(errClass).css("position", "absolute")
+ .css("top", el.offsetTop)
+ .css("left", el.offsetLeft)
+ // setting width can push out the page size, forcing otherwise
+ // unnecessary scrollbars to appear and making it impossible for
+ // the element to shrink; so use max-width instead
+ .css("maxWidth", el.offsetWidth)
+ .css("height", el.offsetHeight);
+ errorDiv.text(err.message);
+ $el.after(errorDiv);
+
+ // Really dumb way to keep the size/position of the error in sync with
+ // the parent element as the window is resized or whatever.
+ var intId = setInterval(function() {
+ if (!errorDiv[0].parentElement) {
+ clearInterval(intId);
+ return;
+ }
+ errorDiv
+ .css("top", el.offsetTop)
+ .css("left", el.offsetLeft)
+ .css("maxWidth", el.offsetWidth)
+ .css("height", el.offsetHeight);
+ }, 500);
+ }
+ }
+ },
+ clearError: function(el) {
+ var $el = $(el);
+ var display = $el.data("restore-display-mode");
+ $el.data("restore-display-mode", null);
+
+ if (display === "inline" || display === "inline-block") {
+ if (display)
+ $el.css("display", display);
+ $(el.nextSibling).filter(".htmlwidgets-error").remove();
+ } else if (display === "block"){
+ $el.css("visibility", "inherit");
+ $(el.nextSibling).filter(".htmlwidgets-error").remove();
+ }
+ },
+ sizing: {}
+ };
+
+ // Called by widget bindings to register a new type of widget. The definition
+ // object can contain the following properties:
+ // - name (required) - A string indicating the binding name, which will be
+ // used by default as the CSS classname to look for.
+ // - initialize (optional) - A function(el) that will be called once per
+ // widget element; if a value is returned, it will be passed as the third
+ // value to renderValue.
+ // - renderValue (required) - A function(el, data, initValue) that will be
+ // called with data. Static contexts will cause this to be called once per
+ // element; Shiny apps will cause this to be called multiple times per
+ // element, as the data changes.
+ window.HTMLWidgets.widget = function(definition) {
+ if (!definition.name) {
+ throw new Error("Widget must have a name");
+ }
+ if (!definition.type) {
+ throw new Error("Widget must have a type");
+ }
+ // Currently we only support output widgets
+ if (definition.type !== "output") {
+ throw new Error("Unrecognized widget type '" + definition.type + "'");
+ }
+ // TODO: Verify that .name is a valid CSS classname
+
+ // Support new-style instance-bound definitions. Old-style class-bound
+ // definitions have one widget "object" per widget per type/class of
+ // widget; the renderValue and resize methods on such widget objects
+ // take el and instance arguments, because the widget object can't
+ // store them. New-style instance-bound definitions have one widget
+ // object per widget instance; the definition that's passed in doesn't
+ // provide renderValue or resize methods at all, just the single method
+ // factory(el, width, height)
+ // which returns an object that has renderValue(x) and resize(w, h).
+ // This enables a far more natural programming style for the widget
+ // author, who can store per-instance state using either OO-style
+ // instance fields or functional-style closure variables (I guess this
+ // is in contrast to what can only be called C-style pseudo-OO which is
+ // what we required before).
+ if (definition.factory) {
+ definition = createLegacyDefinitionAdapter(definition);
+ }
+
+ if (!definition.renderValue) {
+ throw new Error("Widget must have a renderValue function");
+ }
+
+ // For static rendering (non-Shiny), use a simple widget registration
+ // scheme. We also use this scheme for Shiny apps/documents that also
+ // contain static widgets.
+ window.HTMLWidgets.widgets = window.HTMLWidgets.widgets || [];
+ // Merge defaults into the definition; don't mutate the original definition.
+ var staticBinding = extend({}, defaults, definition);
+ overrideMethod(staticBinding, "find", function(superfunc) {
+ return function(scope) {
+ var results = superfunc(scope);
+ // Filter out Shiny outputs, we only want the static kind
+ return filterByClass(results, "html-widget-output", false);
+ };
+ });
+ window.HTMLWidgets.widgets.push(staticBinding);
+
+ if (shinyMode) {
+ // Shiny is running. Register the definition with an output binding.
+ // The definition itself will not be the output binding, instead
+ // we will make an output binding object that delegates to the
+ // definition. This is because we foolishly used the same method
+ // name (renderValue) for htmlwidgets definition and Shiny bindings
+ // but they actually have quite different semantics (the Shiny
+ // bindings receive data that includes lots of metadata that it
+ // strips off before calling htmlwidgets renderValue). We can't
+ // just ignore the difference because in some widgets it's helpful
+ // to call this.renderValue() from inside of resize(), and if
+ // we're not delegating, then that call will go to the Shiny
+ // version instead of the htmlwidgets version.
+
+ // Merge defaults with definition, without mutating either.
+ var bindingDef = extend({}, defaults, definition);
+
+ // This object will be our actual Shiny binding.
+ var shinyBinding = new Shiny.OutputBinding();
+
+ // With a few exceptions, we'll want to simply use the bindingDef's
+ // version of methods if they are available, otherwise fall back to
+ // Shiny's defaults. NOTE: If Shiny's output bindings gain additional
+ // methods in the future, and we want them to be overrideable by
+ // HTMLWidget binding definitions, then we'll need to add them to this
+ // list.
+ delegateMethod(shinyBinding, bindingDef, "getId");
+ delegateMethod(shinyBinding, bindingDef, "onValueChange");
+ delegateMethod(shinyBinding, bindingDef, "onValueError");
+ delegateMethod(shinyBinding, bindingDef, "renderError");
+ delegateMethod(shinyBinding, bindingDef, "clearError");
+ delegateMethod(shinyBinding, bindingDef, "showProgress");
+
+ // The find, renderValue, and resize are handled differently, because we
+ // want to actually decorate the behavior of the bindingDef methods.
+
+ shinyBinding.find = function(scope) {
+ var results = bindingDef.find(scope);
+
+ // Only return elements that are Shiny outputs, not static ones
+ var dynamicResults = results.filter(".html-widget-output");
+
+ // It's possible that whatever caused Shiny to think there might be
+ // new dynamic outputs, also caused there to be new static outputs.
+ // Since there might be lots of different htmlwidgets bindings, we
+ // schedule execution for later--no need to staticRender multiple
+ // times.
+ if (results.length !== dynamicResults.length)
+ scheduleStaticRender();
+
+ return dynamicResults;
+ };
+
+ // Wrap renderValue to handle initialization, which unfortunately isn't
+ // supported natively by Shiny at the time of this writing.
+
+ shinyBinding.renderValue = function(el, data) {
+ Shiny.renderDependencies(data.deps);
+ // Resolve strings marked as javascript literals to objects
+ if (!(data.evals instanceof Array)) data.evals = [data.evals];
+ for (var i = 0; data.evals && i < data.evals.length; i++) {
+ window.HTMLWidgets.evaluateStringMember(data.x, data.evals[i]);
+ }
+ if (!bindingDef.renderOnNullValue) {
+ if (data.x === null) {
+ el.style.visibility = "hidden";
+ return;
+ } else {
+ el.style.visibility = "inherit";
+ }
+ }
+ if (!elementData(el, "initialized")) {
+ initSizing(el);
+
+ elementData(el, "initialized", true);
+ if (bindingDef.initialize) {
+ var rect = el.getBoundingClientRect();
+ var result = bindingDef.initialize(el, rect.width, rect.height);
+ elementData(el, "init_result", result);
+ }
+ }
+ bindingDef.renderValue(el, data.x, elementData(el, "init_result"));
+ evalAndRun(data.jsHooks.render, elementData(el, "init_result"), [el, data.x]);
+ };
+
+ // Only override resize if bindingDef implements it
+ if (bindingDef.resize) {
+ shinyBinding.resize = function(el, width, height) {
+ // Shiny can call resize before initialize/renderValue have been
+ // called, which doesn't make sense for widgets.
+ if (elementData(el, "initialized")) {
+ bindingDef.resize(el, width, height, elementData(el, "init_result"));
+ }
+ };
+ }
+
+ Shiny.outputBindings.register(shinyBinding, bindingDef.name);
+ }
+ };
+
+ var scheduleStaticRenderTimerId = null;
+ function scheduleStaticRender() {
+ if (!scheduleStaticRenderTimerId) {
+ scheduleStaticRenderTimerId = setTimeout(function() {
+ scheduleStaticRenderTimerId = null;
+ window.HTMLWidgets.staticRender();
+ }, 1);
+ }
+ }
+
+ // Render static widgets after the document finishes loading
+ // Statically render all elements that are of this widget's class
+ window.HTMLWidgets.staticRender = function() {
+ var bindings = window.HTMLWidgets.widgets || [];
+ forEach(bindings, function(binding) {
+ var matches = binding.find(document.documentElement);
+ forEach(matches, function(el) {
+ var sizeObj = initSizing(el, binding);
+
+ var getSize = function(el) {
+ if (sizeObj) {
+ return {w: sizeObj.getWidth(), h: sizeObj.getHeight()}
+ } else {
+ var rect = el.getBoundingClientRect();
+ return {w: rect.width, h: rect.height}
+ }
+ };
+
+ if (hasClass(el, "html-widget-static-bound"))
+ return;
+ el.className = el.className + " html-widget-static-bound";
+
+ var initResult;
+ if (binding.initialize) {
+ var size = getSize(el);
+ initResult = binding.initialize(el, size.w, size.h);
+ elementData(el, "init_result", initResult);
+ }
+
+ if (binding.resize) {
+ var lastSize = getSize(el);
+ var resizeHandler = function(e) {
+ var size = getSize(el);
+ if (size.w === 0 && size.h === 0)
+ return;
+ if (size.w === lastSize.w && size.h === lastSize.h)
+ return;
+ lastSize = size;
+ binding.resize(el, size.w, size.h, initResult);
+ };
+
+ on(window, "resize", resizeHandler);
+
+ // This is needed for cases where we're running in a Shiny
+ // app, but the widget itself is not a Shiny output, but
+ // rather a simple static widget. One example of this is
+ // an rmarkdown document that has runtime:shiny and widget
+ // that isn't in a render function. Shiny only knows to
+ // call resize handlers for Shiny outputs, not for static
+ // widgets, so we do it ourselves.
+ if (window.jQuery) {
+ window.jQuery(document).on(
+ "shown.htmlwidgets shown.bs.tab.htmlwidgets shown.bs.collapse.htmlwidgets",
+ resizeHandler
+ );
+ window.jQuery(document).on(
+ "hidden.htmlwidgets hidden.bs.tab.htmlwidgets hidden.bs.collapse.htmlwidgets",
+ resizeHandler
+ );
+ }
+
+ // This is needed for the specific case of ioslides, which
+ // flips slides between display:none and display:block.
+ // Ideally we would not have to have ioslide-specific code
+ // here, but rather have ioslides raise a generic event,
+ // but the rmarkdown package just went to CRAN so the
+ // window to getting that fixed may be long.
+ if (window.addEventListener) {
+ // It's OK to limit this to window.addEventListener
+ // browsers because ioslides itself only supports
+ // such browsers.
+ on(document, "slideenter", resizeHandler);
+ on(document, "slideleave", resizeHandler);
+ }
+ }
+
+ var scriptData = document.querySelector("script[data-for='" + el.id + "'][type='application/json']");
+ if (scriptData) {
+ var data = JSON.parse(scriptData.textContent || scriptData.text);
+ // Resolve strings marked as javascript literals to objects
+ if (!(data.evals instanceof Array)) data.evals = [data.evals];
+ for (var k = 0; data.evals && k < data.evals.length; k++) {
+ window.HTMLWidgets.evaluateStringMember(data.x, data.evals[k]);
+ }
+ binding.renderValue(el, data.x, initResult);
+ evalAndRun(data.jsHooks.render, initResult, [el, data.x]);
+ }
+ });
+ });
+
+ invokePostRenderHandlers();
+ }
+
+
+ function has_jQuery3() {
+ if (!window.jQuery) {
+ return false;
+ }
+ var $version = window.jQuery.fn.jquery;
+ var $major_version = parseInt($version.split(".")[0]);
+ return $major_version >= 3;
+ }
+
+ /*
+ / Shiny 1.4 bumped jQuery from 1.x to 3.x which means jQuery's
+ / on-ready handler (i.e., $(fn)) is now asyncronous (i.e., it now
+ / really means $(setTimeout(fn)).
+ / https://jquery.com/upgrade-guide/3.0/#breaking-change-document-ready-handlers-are-now-asynchronous
+ /
+ / Since Shiny uses $() to schedule initShiny, shiny>=1.4 calls initShiny
+ / one tick later than it did before, which means staticRender() is
+ / called renderValue() earlier than (advanced) widget authors might be expecting.
+ / https://github.com/rstudio/shiny/issues/2630
+ /
+ / For a concrete example, leaflet has some methods (e.g., updateBounds)
+ / which reference Shiny methods registered in initShiny (e.g., setInputValue).
+ / Since leaflet is privy to this life-cycle, it knows to use setTimeout() to
+ / delay execution of those methods (until Shiny methods are ready)
+ / https://github.com/rstudio/leaflet/blob/18ec981/javascript/src/index.js#L266-L268
+ /
+ / Ideally widget authors wouldn't need to use this setTimeout() hack that
+ / leaflet uses to call Shiny methods on a staticRender(). In the long run,
+ / the logic initShiny should be broken up so that method registration happens
+ / right away, but binding happens later.
+ */
+ function maybeStaticRenderLater() {
+ if (shinyMode && has_jQuery3()) {
+ window.jQuery(window.HTMLWidgets.staticRender);
+ } else {
+ window.HTMLWidgets.staticRender();
+ }
+ }
+
+ if (document.addEventListener) {
+ document.addEventListener("DOMContentLoaded", function() {
+ document.removeEventListener("DOMContentLoaded", arguments.callee, false);
+ maybeStaticRenderLater();
+ }, false);
+ } else if (document.attachEvent) {
+ document.attachEvent("onreadystatechange", function() {
+ if (document.readyState === "complete") {
+ document.detachEvent("onreadystatechange", arguments.callee);
+ maybeStaticRenderLater();
+ }
+ });
+ }
+
+
+ window.HTMLWidgets.getAttachmentUrl = function(depname, key) {
+ // If no key, default to the first item
+ if (typeof(key) === "undefined")
+ key = 1;
+
+ var link = document.getElementById(depname + "-" + key + "-attachment");
+ if (!link) {
+ throw new Error("Attachment " + depname + "/" + key + " not found in document");
+ }
+ return link.getAttribute("href");
+ };
+
+ window.HTMLWidgets.dataframeToD3 = function(df) {
+ var names = [];
+ var length;
+ for (var name in df) {
+ if (df.hasOwnProperty(name))
+ names.push(name);
+ if (typeof(df[name]) !== "object" || typeof(df[name].length) === "undefined") {
+ throw new Error("All fields must be arrays");
+ } else if (typeof(length) !== "undefined" && length !== df[name].length) {
+ throw new Error("All fields must be arrays of the same length");
+ }
+ length = df[name].length;
+ }
+ var results = [];
+ var item;
+ for (var row = 0; row < length; row++) {
+ item = {};
+ for (var col = 0; col < names.length; col++) {
+ item[names[col]] = df[names[col]][row];
+ }
+ results.push(item);
+ }
+ return results;
+ };
+
+ window.HTMLWidgets.transposeArray2D = function(array) {
+ if (array.length === 0) return array;
+ var newArray = array[0].map(function(col, i) {
+ return array.map(function(row) {
+ return row[i]
+ })
+ });
+ return newArray;
+ };
+ // Split value at splitChar, but allow splitChar to be escaped
+ // using escapeChar. Any other characters escaped by escapeChar
+ // will be included as usual (including escapeChar itself).
+ function splitWithEscape(value, splitChar, escapeChar) {
+ var results = [];
+ var escapeMode = false;
+ var currentResult = "";
+ for (var pos = 0; pos < value.length; pos++) {
+ if (!escapeMode) {
+ if (value[pos] === splitChar) {
+ results.push(currentResult);
+ currentResult = "";
+ } else if (value[pos] === escapeChar) {
+ escapeMode = true;
+ } else {
+ currentResult += value[pos];
+ }
+ } else {
+ currentResult += value[pos];
+ escapeMode = false;
+ }
+ }
+ if (currentResult !== "") {
+ results.push(currentResult);
+ }
+ return results;
+ }
+ // Function authored by Yihui/JJ Allaire
+ window.HTMLWidgets.evaluateStringMember = function(o, member) {
+ var parts = splitWithEscape(member, '.', '\\');
+ for (var i = 0, l = parts.length; i < l; i++) {
+ var part = parts[i];
+ // part may be a character or 'numeric' member name
+ if (o !== null && typeof o === "object" && part in o) {
+ if (i == (l - 1)) { // if we are at the end of the line then evalulate
+ if (typeof o[part] === "string")
+ o[part] = tryEval(o[part]);
+ } else { // otherwise continue to next embedded object
+ o = o[part];
+ }
+ }
+ }
+ };
+
+ // Retrieve the HTMLWidget instance (i.e. the return value of an
+ // HTMLWidget binding's initialize() or factory() function)
+ // associated with an element, or null if none.
+ window.HTMLWidgets.getInstance = function(el) {
+ return elementData(el, "init_result");
+ };
+
+ // Finds the first element in the scope that matches the selector,
+ // and returns the HTMLWidget instance (i.e. the return value of
+ // an HTMLWidget binding's initialize() or factory() function)
+ // associated with that element, if any. If no element matches the
+ // selector, or the first matching element has no HTMLWidget
+ // instance associated with it, then null is returned.
+ //
+ // The scope argument is optional, and defaults to window.document.
+ window.HTMLWidgets.find = function(scope, selector) {
+ if (arguments.length == 1) {
+ selector = scope;
+ scope = document;
+ }
+
+ var el = scope.querySelector(selector);
+ if (el === null) {
+ return null;
+ } else {
+ return window.HTMLWidgets.getInstance(el);
+ }
+ };
+
+ // Finds all elements in the scope that match the selector, and
+ // returns the HTMLWidget instances (i.e. the return values of
+ // an HTMLWidget binding's initialize() or factory() function)
+ // associated with the elements, in an array. If elements that
+ // match the selector don't have an associated HTMLWidget
+ // instance, the returned array will contain nulls.
+ //
+ // The scope argument is optional, and defaults to window.document.
+ window.HTMLWidgets.findAll = function(scope, selector) {
+ if (arguments.length == 1) {
+ selector = scope;
+ scope = document;
+ }
+
+ var nodes = scope.querySelectorAll(selector);
+ var results = [];
+ for (var i = 0; i < nodes.length; i++) {
+ results.push(window.HTMLWidgets.getInstance(nodes[i]));
+ }
+ return results;
+ };
+
+ var postRenderHandlers = [];
+ function invokePostRenderHandlers() {
+ while (postRenderHandlers.length) {
+ var handler = postRenderHandlers.shift();
+ if (handler) {
+ handler();
+ }
+ }
+ }
+
+ // Register the given callback function to be invoked after the
+ // next time static widgets are rendered.
+ window.HTMLWidgets.addPostRenderHandler = function(callback) {
+ postRenderHandlers.push(callback);
+ };
+
+ // Takes a new-style instance-bound definition, and returns an
+ // old-style class-bound definition. This saves us from having
+ // to rewrite all the logic in this file to accomodate both
+ // types of definitions.
+ function createLegacyDefinitionAdapter(defn) {
+ var result = {
+ name: defn.name,
+ type: defn.type,
+ initialize: function(el, width, height) {
+ return defn.factory(el, width, height);
+ },
+ renderValue: function(el, x, instance) {
+ return instance.renderValue(x);
+ },
+ resize: function(el, width, height, instance) {
+ return instance.resize(width, height);
+ }
+ };
+
+ if (defn.find)
+ result.find = defn.find;
+ if (defn.renderError)
+ result.renderError = defn.renderError;
+ if (defn.clearError)
+ result.clearError = defn.clearError;
+
+ return result;
+ }
+})();
diff --git a/docs/articles/index.html b/docs/articles/index.html
index 94c5af3..fc68a6c 100644
--- a/docs/articles/index.html
+++ b/docs/articles/index.html
@@ -56,7 +56,7 @@ All vignettes
diff --git a/docs/authors.html b/docs/authors.html
index 4e9a1ec..f96c9cc 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -117,7 +117,7 @@ Citation
diff --git a/docs/index.html b/docs/index.html
index baf8e22..d5ac4a4 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -62,13 +62,11 @@
-An R package to quantify the impact of vector control interventions according to mosquito species characteristics
-The AnophelesModel package can be used to parameterize a dynamical model of the mosquito feeding cycle using data about mosquito bionomics (entomological characteristics) and biting patterns, as well as human activity and intervention effects. The different types of data have been extracted from field studies and are included in the package. The model infers the species-specific impact of various vector control interventions on the vectorial capacity. The package can be used to compare the impact of interventions for different mosquito species and to generate parameterizations for the entomological and vector control components of more complex models of malaria transmission dynamics.
-This package is associated with the following manuscript in preparation: M. Golumbeanu, O. Briët, C. Champagne, J. Lemant, B. Zogo, M. Gerhards, M. Sinka, N. Chitnis, M. Penny, E. Pothin, T. Smith. “AnophelesModel: An R package to quantify the effect of vector bionomics on the impact of vector control interventions against malaria transmitted by Anopheles mosquitoes”.
-To install the package:
-devtools::install_github("SwissTPH/AnophelesModel", build_vignettes = TRUE)
-A documentation describing the package use cases and functions is available here and can also be accessed using the following R command:
-browseVignettes(AnophelesModel)
+AnophelesModel is an R package to quantify the impact of vector control interventions according to mosquito species characteristics. It can be used to parameterize a dynamical model of the mosquito feeding cycle using data about mosquito bionomics (entomological characteristics) and biting patterns, as well as human activity and intervention effects. The different types of data have been extracted from field studies and are included in the package. The model infers the species-specific impact of various vector control interventions on the vectorial capacity. The package can be used to compare the impact of interventions for different mosquito species and to generate geographic-specific parameterizations for the entomological and vector control components of more complex models of malaria transmission dynamics.
+This package is associated with the following manuscript: M. Golumbeanu, O. Briët, C. Champagne, J. Lemant, M. Winkel, B. Zogo, M. Gerhards, M. Sinka, N. Chitnis, M. Penny, E. Pothin, T. Smith. “AnophelesModel: An R package to quantify the effect of vector bionomics on the impact of vector control interventions against malaria transmitted by Anopheles mosquitoes”.
+The scripts and data used for generating figures 2-4 in the manuscript are provided at https://github.com/SwissTPH/AnophelesModel/tree/main/extdata (scripts example_fig2.R, etc.).
+To install the package: {r} devtools::install_github("SwissTPH/AnophelesModel", build_vignettes = TRUE)
IMPORTANT: To be able to build the vignette during package installation, you need to have the following packages installed: DiagrammeR, ggpubr, and Hmisc.
+A documentation describing the package use cases and functions is available here and can also be accessed using the following R command: {r} browseVignettes(AnophelesModel)
@@ -118,7 +116,7 @@ Developers
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 12c88b0..2e7c632 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -1,7 +1,7 @@
-pandoc: 2.11.4
-pkgdown: 2.0.6
+pandoc: 3.1.1
+pkgdown: 2.0.7
pkgdown_sha: ~
articles:
AnophelesModel: AnophelesModel.html
-last_built: 2023-06-26T06:00Z
+last_built: 2023-10-17T20:04Z
diff --git a/docs/reference/AnophelesModel-1.png b/docs/reference/AnophelesModel-1.png
index 8371de1..d64443f 100644
Binary files a/docs/reference/AnophelesModel-1.png and b/docs/reference/AnophelesModel-1.png differ
diff --git a/docs/reference/AnophelesModel-package.html b/docs/reference/AnophelesModel-package.html
index 87e8300..52b9b4b 100644
--- a/docs/reference/AnophelesModel-package.html
+++ b/docs/reference/AnophelesModel-package.html
@@ -64,12 +64,6 @@ Overview
intervention impact across different Anopheles mosquito species and thus
help prioritizing interventions according to local entomological
characteristics.
-
-
- References
-
-
-
diff --git a/docs/reference/AnophelesModel.html b/docs/reference/AnophelesModel.html
index bafb64d..458a666 100644
--- a/docs/reference/AnophelesModel.html
+++ b/docs/reference/AnophelesModel.html
@@ -3402,7 +3402,7 @@ Examples
diff --git a/docs/reference/activity_patterns.html b/docs/reference/activity_patterns.html
index d8b3a16..caf70e6 100644
--- a/docs/reference/activity_patterns.html
+++ b/docs/reference/activity_patterns.html
@@ -116,7 +116,7 @@ Examples
diff --git a/docs/reference/build_model_obj.html b/docs/reference/build_model_obj.html
index 365605c..e96e4df 100644
--- a/docs/reference/build_model_obj.html
+++ b/docs/reference/build_model_obj.html
@@ -233,7 +233,7 @@ Examples
diff --git a/docs/reference/calculate_impact.html b/docs/reference/calculate_impact.html
index a4468f1..6fa621a 100644
--- a/docs/reference/calculate_impact.html
+++ b/docs/reference/calculate_impact.html
@@ -106,12 +106,6 @@ Author
Tom Smith, thomas.smith@swisstph.ch
-
- Examples
-
-
-
-
Tom Smith, thomas.smith@swisstph.ch
-
-
Monica Golumbeanu, monica.golumbeanu@swisstph.ch
-
-
Monica Golumbeanu, monica.golumbeanu@swisstph.ch
-
-
-
Tom Smith, thomas.smith@swisstph.ch
-
-
-
Tom Smith, thomas.smith@swisstph.ch
-
-
-
Tom Smith, thomas.smith@swisstph.ch
-net_surv = get_net_survival_and_holed_area()
-#> Error in get_net_survival_and_holed_area(): could not find function "get_net_survival_and_holed_area"
-print(net_surv)
-#> Error in print(net_surv): object 'net_surv' not found
-
-
net_insecticide_types = get_net_insecticide_types()
-#> Error in get_net_insecticide_types(): could not find function "get_net_insecticide_types"
+ net_insecticide_types = get_net_insecticides()
print(net_insecticide_types)
-#> Error in print(net_insecticide_types): object 'net_insecticide_types' not found
+#> [1] "Default" "PermaNet 2.0"
+#> [3] "DawaPlus 2.0" "DuraNet"
+#> [5] "Interceptor" "LifeNet"
+#> [7] "Netprotect" "Olyset"
+#> [9] "PermaNet 3.0" "PermaNet 3.0 lower side panels"
+#> [11] "PermaNet 3.0 upper side panels" "PermaNet 3.0 top panel"
+#> [13] "Lambdacyhalothrin (gambiae)" "Lambdacyhalothrin (albimanus)"
Tom Smith, thomas.smith@swisstph.ch
-
-
-
Monica Golumbeanu, monica.golumbeanu@swisstph.ch
-
-
-