diff --git a/NAMESPACE b/NAMESPACE index d981d8c4..8f136d21 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -228,8 +228,6 @@ S3method(update_inits_X,SIP) S3method(update_inits_X,SIS) S3method(update_inits_X,hMoI) S3method(update_inits_X,trace) -S3method(xde_lines_X,SIP) -S3method(xde_lines_X,SIS) S3method(xde_plot_X,SIP) S3method(xde_plot_X,SIS) S3method(xde_solve,aqua) @@ -474,7 +472,8 @@ export(xDE_diffeqn_mosy) export(xde_lines_EIR) export(xde_lines_M) export(xde_lines_PR) -export(xde_lines_X) +export(xde_lines_X_SIP) +export(xde_lines_X_SIS) export(xde_lines_YZ) export(xde_lines_YZ_fracs) export(xde_lines_aEIR) diff --git a/R/adult-RM.R b/R/adult-RM.R index fe657028..8a19ece7 100644 --- a/R/adult-RM.R +++ b/R/adult-RM.R @@ -54,7 +54,7 @@ F_eggs.RM <- function(t, y, pars, s) { #' @export dMYZdt.RM_ode <- function(t, y, pars, s) { Lambda = pars$Lambda[[s]] - kappa = pars$kappa [[s]] + kappa = pars$kappa[[s]] with(pars$ix$MYZ[[s]],{ M <- y[M_ix] @@ -83,7 +83,7 @@ dMYZdt.RM_ode <- function(t, y, pars, s) { dMYZdt.RM_dde <- function(t, y, pars, s){ Lambda = pars$Lambda[[s]] - kappa = pars$kappa [[s]] + kappa = pars$kappa[[s]] with(pars$ix$MYZ[[s]],{ M <- y[M_ix] @@ -110,6 +110,7 @@ dMYZdt.RM_dde <- function(t, y, pars, s){ Omega <- make_Omega(g, sigma, calK, nPatches) Omega_eip <- make_Omega(g_eip, sigma_eip, calK, nPatches) + dMdt <- Lambda - (Omega %*% M) dPdt <- f*(M - P) - (Omega %*% P) dYdt <- f*q*kappa*(M - Y) - (Omega %*% Y) diff --git a/R/aquatic-trace.R b/R/aquatic-trace.R index d3899693..3dcd017c 100644 --- a/R/aquatic-trace.R +++ b/R/aquatic-trace.R @@ -15,8 +15,7 @@ LBionomics.trace <- function(t, y, pars, s) { #' @return a [numeric] vector of length `nHabitats` #' @export F_alpha.trace <- function(t, y, pars, s) { - Lp = pars$Lpar[[s]] - with(Lp, Lt(t, Lp)) + pars$Lpar[[s]]$Lt(t) } #' @title Derivatives for aquatic stage mosquitoes @@ -60,7 +59,8 @@ make_Lpar_trace = function(nHabitats, Lopts=list(), Lambda=1000, Lt = NULL){ Lpar = list() class(Lpar) <- "trace" Lpar$Lambda = checkIt(Lambda, nHabitats) - if(is.null(Lt)) Lt = function(t, Lpar){Lpar$Lambda} + #if(is.null(Lt)) Lt = function(t, Lpar){Lpar$Lambda} + if(is.null(Lt)) Lt = function(t){Lambda} Lpar$Lt = Lt return(Lpar) })} @@ -93,8 +93,8 @@ make_parameters_L_trace <- function(pars, Lambda, Lt=NULL) { stopifnot(is.numeric(Lambda)) Lpar <- list() class(Lpar) <- 'trace' - Lpar$Lambda <- Lambda - if(is.null(Lt)) Lt = function(t, Lpar){Lpar$Lambda} + Lpar$Lambda = checkIt(Lambda, pars$nHabitats) + if(is.null(Lt)) Lt = function(t){Lambda} Lpar$Lt = Lt pars$Lpar[[1]] <- Lpar return(pars) diff --git a/R/compute.R b/R/compute.R index be01246d..05bf3bd3 100644 --- a/R/compute.R +++ b/R/compute.R @@ -19,11 +19,13 @@ compute_terms <- function(varslist, deout, pars, s, i) { #' @export compute_terms.xde <- function(varslist, deout, pars, s, i) { time = deout[,1] + eir = c() + kappa = c() for (ix in 1:length(time)){ - yt = deout[i,-1] - pars = Transmission(time[i], yt, pars) - eir = pars$EIR[[1]] - kappa = pars$kappa[[1]] + yt = deout[ix,-1] + pars = Transmission(time[ix], yt, pars) + eir = c(eir, pars$EIR[[1]]) + kappa = c(kappa, pars$kappa[[1]]) } ni = compute_NI(deout, pars, i) fqZ = compute_fqZ(deout, pars, s) @@ -56,10 +58,11 @@ compute_terms.cohort <- function(varslist, deout, pars, s, i) { #' @export compute_terms.human<- function(varslist, deout, pars, s, i) { time = deout[,1] + eir = c() for (ix in 1:length(time)){ yt = deout[i,-1] pars = Transmission(time[i], yt, pars) - eir = pars$EIR[[1]] + eir = c(eir, pars$EIR[[1]]) } ni = compute_NI(deout, pars) fqZ = compute_fqZ(deout, pars) diff --git a/R/human-SIP.R b/R/human-SIP.R index 90887229..2f1b87e2 100644 --- a/R/human-SIP.R +++ b/R/human-SIP.R @@ -250,7 +250,7 @@ get_inits_X.SIP <- function(pars, i){with(pars$Xinits[[i]],{ #' #' @inheritParams xde_plot_X #' @export -xde_plot_X.SIP = function(pars, i, clrs=c("darkblue", "darkred", "darkgreen"), llty=1, stable=FALSE, add_axes=TRUE){ +xde_plot_X.SIP = function(pars, i=1, clrs=c("darkblue", "darkred", "darkgreen"), llty=1, stable=FALSE, add_axes=TRUE){ vars=with(pars$outputs,if(stable==TRUE){stable_orbits}else{orbits}) if(add_axes==TRUE) @@ -258,16 +258,19 @@ xde_plot_X.SIP = function(pars, i, clrs=c("darkblue", "darkred", "darkgreen"), l plot(time, 0*time, type = "n", ylim = c(0, max(H)), ylab = "# Infected", xlab = "Time")) - xde_lines_X(vars$XH[[i]], pars, clrs, llty) + xde_lines_X_SIP(vars$XH[[i]], pars, clrs, llty) } #' Add lines for the density of infected individuals for the SIP model #' -#' @inheritParams xde_lines_X +#' @param XH a list with the outputs of parse_deout_X_SIS +#' @param pars a list that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param clrs a vector of colors +#' @param llty an integer (or integers) to set the `lty` for plotting #' #' @export -xde_lines_X.SIP = function(XH, pars, clrs=c("darkblue", "darkred", "darkgreen"), llty=1){ +xde_lines_X_SIP = function(XH, pars, clrs=c("darkblue", "darkred", "darkgreen"), llty=1){ with(XH,{ if(pars$nStrata==1) { lines(time, S, col=clrs[1], lty = llty[1]) diff --git a/R/human-SIS.R b/R/human-SIS.R index e1f32117..9bbd7d15 100644 --- a/R/human-SIS.R +++ b/R/human-SIS.R @@ -222,7 +222,7 @@ get_inits_X.SIS <- function(pars, i){ #' #' @inheritParams xde_plot_X #' @export -xde_plot_X.SIS = function(pars, i, clrs=c("darkblue","darkred"), llty=1, stable=FALSE, add_axes=TRUE){ +xde_plot_X.SIS = function(pars, i=1, clrs=c("darkblue","darkred"), llty=1, stable=FALSE, add_axes=TRUE){ vars=with(pars$outputs,if(stable==TRUE){stable_orbits}else{orbits}) if(add_axes==TRUE) @@ -230,27 +230,31 @@ xde_plot_X.SIS = function(pars, i, clrs=c("darkblue","darkred"), llty=1, stable= plot(time, 0*time, type = "n", ylim = c(0, max(H)), ylab = "# Infected", xlab = "Time")) - xde_lines_X(vars$XH[[i]], pars, clrs, llty) + xde_lines_X_SIS(vars$XH[[i]], pars, clrs, llty) } #' Add lines for the density of infected individuals for the SIS model #' -#' @inheritParams xde_lines_X +#' @param XH a list with the outputs of parse_deout_X_SIS +#' @param pars a list that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param clrs a vector of colors +#' @param llty an integer (or integers) to set the `lty` for plotting #' #' @export -xde_lines_X.SIS = function(XH, pars, clrs=c("darkblue","darkred"), llty=1){ +xde_lines_X_SIS = function(XH, pars, clrs=c("darkblue","darkred"), llty=1){ with(XH,{ if(pars$nStrata==1) { lines(time, S, col=clrs[1], lty = llty[1]) lines(time, I, col=clrs[2], lty = llty[1]) } if(pars$nStrata>1){ - if (length(clrs)==1) clrs=matrix(clrs, 2, pars$nStrata) + if (length(clrs)==2) clrs=matrix(clrs, 2, pars$nStrata) if (length(llty)==1) llty=rep(llty, pars$nStrata) + for(i in 1:pars$nStrata){ - lines(time, S[,i], col=clrs[i,1], lty = llty[i]) - lines(time, I[,i], col=clrs[i,2], lty = llty[i]) + lines(time, S[,i], col=clrs[1,i], lty = llty[i]) + lines(time, I[,i], col=clrs[2,i], lty = llty[i]) } } })} diff --git a/R/human-interface.R b/R/human-interface.R index 741d17e3..e8f64377 100644 --- a/R/human-interface.R +++ b/R/human-interface.R @@ -144,19 +144,6 @@ HTC <- function(pars, i) { #' @param add_axes a logical: plot axes only if TRUE #' #' @export -xde_plot_X = function(pars, i, clrs="black", llty=1, stable=FALSE, add_axes=TRUE){ +xde_plot_X = function(pars, i=1, clrs="black", llty=1, stable=FALSE, add_axes=TRUE){ UseMethod("xde_plot_X", pars$Xpar[[i]]) } - -#' Add lines for basic outputs of epidemiological models -#' -#' @param XH a list with the outputs of `exDE::parse_deout()` -#' @param pars a list that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) -#' @param clrs a vector of colors -#' @param llty an integer (or integers) to set the `lty` for plotting -#' -#' @export -xde_lines_X = function(XH, pars, clrs="black", llty=1){ - UseMethod("xde_lines_X", pars$Xpar) -} - diff --git a/R/plot-MYZ.R b/R/plot-MYZ.R index 8f73631e..7a2f4a15 100644 --- a/R/plot-MYZ.R +++ b/R/plot-MYZ.R @@ -2,20 +2,21 @@ #' Plot adult mosquito population density #' #' @param pars a list that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param s the vector species index #' @param clrs a vector of colors #' @param llty an integer (or integers) to set the `lty` for plotting #' @param stable a logical: set to FALSE for `orbits` and TRUE for `stable_orbits` #' @param add_axes a logical: plot axes only if TRUE #' #' @export -xde_plot_M = function(pars, clrs="darkblue", llty=1, stable=FALSE, add_axes=TRUE){ +xde_plot_M = function(pars, s=1, clrs="darkblue", llty=1, stable=FALSE, add_axes=TRUE){ vars=with(pars$outputs,if(stable==TRUE){stable_orbits}else{orbits}) - if(add_axes == TRUE) with(vars$MYZ, + if(add_axes == TRUE) with(vars$MYZ[[s]], plot(time, 0*time, type = "n", ylim = range(0,max(M)), ylab = "Mosquito Density", xlab = "Time")) - xde_lines_M(vars$MYZ, pars, clrs, llty) + xde_lines_M(vars$MYZ[[s]], pars, clrs, llty) } #' Add lines for adult mosquito population density @@ -41,6 +42,7 @@ xde_lines_M = function(MYZ, pars, clrs="darkblue", llty=1){ #' Plot the density of infected and infective mosquitoes #' #' @param pars a list that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param s the vector species index #' @param Yclrs a vector of colors for infected mosquitoes #' @param Zclrs a vector of colors for infective mosquitoes #' @param llty an integer (or integers) to set the `lty` for plotting @@ -48,15 +50,15 @@ xde_lines_M = function(MYZ, pars, clrs="darkblue", llty=1){ #' @param add_axes to plot axes only if TRUE #' #' @export -xde_plot_YZ = function(pars, Yclrs = "purple", Zclrs="darkred", llty=1, stable=FALSE, add_axes=TRUE){ +xde_plot_YZ = function(pars, s=1, Yclrs = "purple", Zclrs="darkred", llty=1, stable=FALSE, add_axes=TRUE){ vars=with(pars$outputs,if(stable==TRUE){stable_orbits}else{orbits}) if(add_axes == TRUE) - with(vars$MYZ, + with(vars$MYZ[[s]], plot(time, 0*time, type = "n", ylim = range(0,max(Y)), ylab = "Mosquito Density", xlab = "Time")) - xde_lines_YZ(vars$MYZ, pars, Yclrs, Zclrs, llty) + xde_lines_YZ(vars$MYZ[[s]], pars, Yclrs, Zclrs, llty) } #' Add lines for the density of infected and infective mosquitoes @@ -89,6 +91,7 @@ xde_lines_YZ = function(MYZ, pars, Yclrs="purple", Zclrs = "darkred", llty=1){ #' Plot the fraction of infected and infective mosquitoes #' #' @param pars a list that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param s the vector species index #' @param Yclrs a vector of colors for infected mosquitoes #' @param Zclrs a vector of colors for infective mosquitoes #' @param llty an integer (or integers) to set the `lty` for plotting @@ -96,15 +99,15 @@ xde_lines_YZ = function(MYZ, pars, Yclrs="purple", Zclrs = "darkred", llty=1){ #' @param add_axes a logical to plot axes only if TRUE #' #' @export -xde_plot_YZ_fracs = function(pars, Yclrs = "purple", Zclrs = "darkred", llty=1, stable=FALSE, add_axes=TRUE){ +xde_plot_YZ_fracs = function(pars, s=1, Yclrs = "purple", Zclrs = "darkred", llty=1, stable=FALSE, add_axes=TRUE){ vars=with(pars$outputs,if(stable==TRUE){stable_orbits}else{orbits}) if(add_axes == TRUE) - with(vars$MYZ, + with(vars$MYZ[[s]], plot(time, 0*time, type = "n", ylim = range(0,1), ylab = "Fraction Infected", xlab = "Time")) - xde_lines_YZ_fracs(vars$MYZ, pars, Yclrs, Zclrs, llty) + xde_lines_YZ_fracs(vars$MYZ[[s]], pars, Yclrs, Zclrs, llty) } #' Add lines for the fraction of infected and infective mosquitoes diff --git a/R/setup.R b/R/setup.R index 3be59982..04160a3b 100644 --- a/R/setup.R +++ b/R/setup.R @@ -25,7 +25,7 @@ #' @param Lopts a list to configure the L model #' @return a [list] #' @export -xde_setup = function(modelName, +xde_setup = function(modelName = "unnamed", # Dynamical Components MYZname = "RM", @@ -117,7 +117,7 @@ xde_setup = function(modelName, #' @param kappa values -- net infectivity to force adult infection dynamics #' @return a [list] #' @export -xde_setup_mosy = function(modelName, +xde_setup_mosy = function(modelName = "unnamed", # Dynamical Components MYZname = "basicM", @@ -186,7 +186,7 @@ xde_setup_mosy = function(modelName, #' @param LSMname is a character string defining a LSM model #' @return a [list] #' @export -xde_setup_aquatic = function(modelName, +xde_setup_aquatic = function(modelName = "unnamed", nHabitats = 1, nVectors = 1, Lname = "basic", @@ -235,7 +235,7 @@ xde_setup_aquatic = function(modelName, #' @param TaRopts are the options to setup TaR #' @return a [list] #' @export -xde_setup_human = function(modelName, +xde_setup_human = function(modelName = "unnamed", # Dynamical Components Xname = "SIS", @@ -286,8 +286,8 @@ xde_setup_human = function(modelName, } #' @title Set up a model for xde_diffeqn_cohort -#' @param modelName is a name for the model (arbitrary) #' @param F_eir is a function F_eir(t, pars) that returns the daily FoI +#' @param modelName is a name for the model (arbitrary) #' @param Xname is a character string defining a X model #' @param HPop is the number of humans in each patch #' @param searchB is a vector of search weights for blood feeding @@ -295,7 +295,8 @@ xde_setup_human = function(modelName, #' @param Hopts a list to configure the H model #' @return a [list] #' @export -xde_setup_cohort = function(modelName, F_eir, +xde_setup_cohort = function(F_eir, + modelName = "unnamed", # Dynamical Components Xname = "SIS", diff --git a/R/transmission.R b/R/transmission.R index 97fd24f9..b87de930 100644 --- a/R/transmission.R +++ b/R/transmission.R @@ -90,6 +90,6 @@ F_kappa <- function(t, y, pars, beta, i) { #' @export compute_beta = function(H, wts_f, TaR){ W <- as.vector(TaR %*% (wts_f*H)) - beta <- diag(wts_f, length(H)) %*% t(TaR) %*% diag(1/W, dim(TaR)[1]) + beta <- diag(wts_f, length(H)) %*% t(TaR) %*% diag(1/W, length(W)) return(beta) } diff --git a/_pkgdown.yml b/_pkgdown.yml index 5570b22c..6165812c 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -317,7 +317,6 @@ reference: - update_inits_X - HTC - xde_plot_X - - xde_lines_X - subtitle: trace desc: | Specialized methods for a human trace model to pass kappa as a parameter @@ -377,7 +376,7 @@ reference: - make_parameters_X_SIS - HTC.SIS - xde_plot_X.SIS - - xde_lines_X.SIS + - xde_lines_X_SIS - subtitle: SIP desc: | Specialized methods for the SIP (Susceptible-Infected-Prophylaxis) model of human dynamics. @@ -399,7 +398,7 @@ reference: - make_parameters_X_SIP - HTC.SIP - xde_plot_X.SIP - - xde_lines_X.SIP + - xde_lines_X_SIP - title: Human Population Dynamics desc: | Generic methods for the human demography and aging diff --git a/man/xde_lines_X.Rd b/man/xde_lines_X.Rd deleted file mode 100644 index 2f60b1af..00000000 --- a/man/xde_lines_X.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/human-interface.R -\name{xde_lines_X} -\alias{xde_lines_X} -\title{Add lines for basic outputs of epidemiological models} -\usage{ -xde_lines_X(XH, pars, clrs = "black", llty = 1) -} -\arguments{ -\item{XH}{a list with the outputs of \code{exDE::parse_deout()}} - -\item{pars}{a list that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} - -\item{clrs}{a vector of colors} - -\item{llty}{an integer (or integers) to set the \code{lty} for plotting} -} -\description{ -Add lines for basic outputs of epidemiological models -} diff --git a/man/xde_lines_X.SIP.Rd b/man/xde_lines_X_SIP.Rd similarity index 70% rename from man/xde_lines_X.SIP.Rd rename to man/xde_lines_X_SIP.Rd index 71024a3c..b2cd9373 100644 --- a/man/xde_lines_X.SIP.Rd +++ b/man/xde_lines_X_SIP.Rd @@ -1,13 +1,18 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/human-SIP.R -\name{xde_lines_X.SIP} -\alias{xde_lines_X.SIP} +\name{xde_lines_X_SIP} +\alias{xde_lines_X_SIP} \title{Add lines for the density of infected individuals for the SIP model} \usage{ -\method{xde_lines_X}{SIP}(XH, pars, clrs = c("darkblue", "darkred", "darkgreen"), llty = 1) +xde_lines_X_SIP( + XH, + pars, + clrs = c("darkblue", "darkred", "darkgreen"), + llty = 1 +) } \arguments{ -\item{XH}{a list with the outputs of \code{exDE::parse_deout()}} +\item{XH}{a list with the outputs of parse_deout_X_SIS} \item{pars}{a list that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} diff --git a/man/xde_lines_X.SIS.Rd b/man/xde_lines_X_SIS.Rd similarity index 71% rename from man/xde_lines_X.SIS.Rd rename to man/xde_lines_X_SIS.Rd index 32f32094..ab83a7a3 100644 --- a/man/xde_lines_X.SIS.Rd +++ b/man/xde_lines_X_SIS.Rd @@ -1,13 +1,13 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/human-SIS.R -\name{xde_lines_X.SIS} -\alias{xde_lines_X.SIS} +\name{xde_lines_X_SIS} +\alias{xde_lines_X_SIS} \title{Add lines for the density of infected individuals for the SIS model} \usage{ -\method{xde_lines_X}{SIS}(XH, pars, clrs = c("darkblue", "darkred"), llty = 1) +xde_lines_X_SIS(XH, pars, clrs = c("darkblue", "darkred"), llty = 1) } \arguments{ -\item{XH}{a list with the outputs of \code{exDE::parse_deout()}} +\item{XH}{a list with the outputs of parse_deout_X_SIS} \item{pars}{a list that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} diff --git a/man/xde_plot_M.Rd b/man/xde_plot_M.Rd index 514417ff..d0c71897 100644 --- a/man/xde_plot_M.Rd +++ b/man/xde_plot_M.Rd @@ -4,11 +4,20 @@ \alias{xde_plot_M} \title{Plot adult mosquito population density} \usage{ -xde_plot_M(pars, clrs = "darkblue", llty = 1, stable = FALSE, add_axes = TRUE) +xde_plot_M( + pars, + s = 1, + clrs = "darkblue", + llty = 1, + stable = FALSE, + add_axes = TRUE +) } \arguments{ \item{pars}{a list that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} +\item{s}{the vector species index} + \item{clrs}{a vector of colors} \item{llty}{an integer (or integers) to set the \code{lty} for plotting} diff --git a/man/xde_plot_X.Rd b/man/xde_plot_X.Rd index 52657aa1..b7c82860 100644 --- a/man/xde_plot_X.Rd +++ b/man/xde_plot_X.Rd @@ -4,7 +4,14 @@ \alias{xde_plot_X} \title{Basic plotting for epidemiological models} \usage{ -xde_plot_X(pars, i, clrs = "black", llty = 1, stable = FALSE, add_axes = TRUE) +xde_plot_X( + pars, + i = 1, + clrs = "black", + llty = 1, + stable = FALSE, + add_axes = TRUE +) } \arguments{ \item{pars}{a list that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} diff --git a/man/xde_plot_X.SIP.Rd b/man/xde_plot_X.SIP.Rd index be55b2b0..290b3f98 100644 --- a/man/xde_plot_X.SIP.Rd +++ b/man/xde_plot_X.SIP.Rd @@ -6,7 +6,7 @@ \usage{ \method{xde_plot_X}{SIP}( pars, - i, + i = 1, clrs = c("darkblue", "darkred", "darkgreen"), llty = 1, stable = FALSE, diff --git a/man/xde_plot_X.SIS.Rd b/man/xde_plot_X.SIS.Rd index 7a8a1ff8..4164890b 100644 --- a/man/xde_plot_X.SIS.Rd +++ b/man/xde_plot_X.SIS.Rd @@ -6,7 +6,7 @@ \usage{ \method{xde_plot_X}{SIS}( pars, - i, + i = 1, clrs = c("darkblue", "darkred"), llty = 1, stable = FALSE, diff --git a/man/xde_plot_YZ.Rd b/man/xde_plot_YZ.Rd index 8343ed2d..5afa754d 100644 --- a/man/xde_plot_YZ.Rd +++ b/man/xde_plot_YZ.Rd @@ -6,6 +6,7 @@ \usage{ xde_plot_YZ( pars, + s = 1, Yclrs = "purple", Zclrs = "darkred", llty = 1, @@ -16,6 +17,8 @@ xde_plot_YZ( \arguments{ \item{pars}{a list that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} +\item{s}{the vector species index} + \item{Yclrs}{a vector of colors for infected mosquitoes} \item{Zclrs}{a vector of colors for infective mosquitoes} diff --git a/man/xde_plot_YZ_fracs.Rd b/man/xde_plot_YZ_fracs.Rd index bb7d9897..0df45ea9 100644 --- a/man/xde_plot_YZ_fracs.Rd +++ b/man/xde_plot_YZ_fracs.Rd @@ -6,6 +6,7 @@ \usage{ xde_plot_YZ_fracs( pars, + s = 1, Yclrs = "purple", Zclrs = "darkred", llty = 1, @@ -16,6 +17,8 @@ xde_plot_YZ_fracs( \arguments{ \item{pars}{a list that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} +\item{s}{the vector species index} + \item{Yclrs}{a vector of colors for infected mosquitoes} \item{Zclrs}{a vector of colors for infective mosquitoes} diff --git a/man/xde_setup.Rd b/man/xde_setup.Rd index d3df059c..e78bb6a3 100644 --- a/man/xde_setup.Rd +++ b/man/xde_setup.Rd @@ -5,7 +5,7 @@ \title{Set up a model for xde_diffeqn} \usage{ xde_setup( - modelName, + modelName = "unnamed", MYZname = "RM", Xname = "SIS", Lname = "trace", diff --git a/man/xde_setup_aquatic.Rd b/man/xde_setup_aquatic.Rd index ed14fa3f..6f1001c5 100644 --- a/man/xde_setup_aquatic.Rd +++ b/man/xde_setup_aquatic.Rd @@ -5,7 +5,7 @@ \title{Set up a model for xde_diffeqn_aqua} \usage{ xde_setup_aquatic( - modelName, + modelName = "unnamed", nHabitats = 1, nVectors = 1, Lname = "basic", diff --git a/man/xde_setup_cohort.Rd b/man/xde_setup_cohort.Rd index 74274c24..42ff218d 100644 --- a/man/xde_setup_cohort.Rd +++ b/man/xde_setup_cohort.Rd @@ -5,8 +5,8 @@ \title{Set up a model for xde_diffeqn_cohort} \usage{ xde_setup_cohort( - modelName, F_eir, + modelName = "unnamed", Xname = "SIS", HPop = 1000, searchB = 1, @@ -15,10 +15,10 @@ xde_setup_cohort( ) } \arguments{ -\item{modelName}{is a name for the model (arbitrary)} - \item{F_eir}{is a function F_eir(t, pars) that returns the daily FoI} +\item{modelName}{is a name for the model (arbitrary)} + \item{Xname}{is a character string defining a X model} \item{HPop}{is the number of humans in each patch} diff --git a/man/xde_setup_human.Rd b/man/xde_setup_human.Rd index 5261f9a3..e864e830 100644 --- a/man/xde_setup_human.Rd +++ b/man/xde_setup_human.Rd @@ -5,7 +5,7 @@ \title{Set up a model for xde_diffeqn_human} \usage{ xde_setup_human( - modelName, + modelName = "unnamed", Xname = "SIS", HPop = 1000, MYZopts = list(), diff --git a/man/xde_setup_mosy.Rd b/man/xde_setup_mosy.Rd index 5b56c724..24923f3b 100644 --- a/man/xde_setup_mosy.Rd +++ b/man/xde_setup_mosy.Rd @@ -5,7 +5,7 @@ \title{Set up a model for xde_diffeqn_mosy} \usage{ xde_setup_mosy( - modelName, + modelName = "unnamed", MYZname = "basicM", Lname = "basic", nPatches = 1, diff --git a/vignettes/human_hmoi.Rmd b/vignettes/human_hmoi.Rmd index 68263baa..9234e856 100644 --- a/vignettes/human_hmoi.Rmd +++ b/vignettes/human_hmoi.Rmd @@ -156,11 +156,11 @@ F_eir1 = fF_eir1(EIR) ``` ```{r} -xde_setup_cohort("test_hMoI", F_eir1, "hMoI", HPop=Hpop, Xopts = Xo) ->test_hMoI +xde_setup_cohort(F_eir1, Xname="hMoI", HPop=Hpop, Xopts = Xo) ->test_hMoI ``` ```{r} -xde_solve(test_hMoI, 365, 365)$outputs$deout -> out2 +xde_solve(test_hMoI, 365, 365)$outputs$orbits$deout -> out2 approx_equal(out2, out1) ``` diff --git a/vignettes/human_sip.Rmd b/vignettes/human_sip.Rmd index 05680637..76a0a40c 100644 --- a/vignettes/human_sip.Rmd +++ b/vignettes/human_sip.Rmd @@ -138,7 +138,7 @@ F_eir1 = fF_eir1(EIR) ``` ```{r} -xde_setup_cohort("test_SIP", F_eir1, "SIP", HPop=Hpop, Xopts = Xo) -> test_SIP +xde_setup_cohort(F_eir1, Xname="SIP", HPop=Hpop, Xopts = Xo) -> test_SIP ``` ```{r} diff --git a/vignettes/human_sis.Rmd b/vignettes/human_sis.Rmd index d82bc337..4d2ba877 100644 --- a/vignettes/human_sis.Rmd +++ b/vignettes/human_sis.Rmd @@ -154,7 +154,7 @@ F_eir1 = fF_eir1(EIR) ``` ```{r} -xde_setup_cohort("test_SIS", F_eir1, "SIS", HPop=Hpop, Xopts = Xo) -> test_SIS +xde_setup_cohort(F_eir1, Xname="SIS", HPop=Hpop, Xopts = Xo) -> test_SIS ``` ```{r}