diff --git a/DESCRIPTION b/DESCRIPTION index 6133daa..4243532 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: MCSimMod Title: Working with 'MCSim' Models -Version: 1.1.9000 +Version: 1.2 Authors@R: c( person("Dustin F.", "Kapraun", role=c("aut", "cre"), email = "kapraun.dustin@epa.gov", comment = c(ORCID = "0000-0001-5570-6383")), person("Todd J.", "Zurlinden", role="aut", comment = c(ORCID = "0000-0003-1372-3913")), diff --git a/R/MCSim_model.R b/R/MCSim_model.R index 8b6a01f..7d4ec50 100644 --- a/R/MCSim_model.R +++ b/R/MCSim_model.R @@ -149,11 +149,11 @@ Model <- setRefClass("Model", Y0 <<- initStates(parms) }, updateParms = function(new_parms = NULL) { - "Update values of parameters for the Model object." + "Reset the values of the parameters for the Model object to their default values and then update the values of any parameters named in the argument `new_parms` using values provided in that argument." parms <<- initParms(new_parms) }, updateY0 = function(new_states = NULL) { - "Update values of initial conditions of state variables for the Model object." + "Reset the values of the initial conditions of state variables for the Model object to their default values and then update the values of the initial conditions of any state variables named in the argument `new_states` using values provided in that argument." Y0 <<- initStates(parms, new_states) }, runModel = function(times, ...) { diff --git a/R/fixPath.R b/R/fixPath.R index d7a5b47..83b09d7 100644 --- a/R/fixPath.R +++ b/R/fixPath.R @@ -2,14 +2,17 @@ # fixPath #---------------- # Private function to create platform-dependent mPath and mName -# based on absolute path generate by normalizePath +# based on absolute path generated by normalizePath .fixPath <- function(file) { new.mName <- strsplit(basename(file), "[.]")[[1]][1] new.mPath <- dirname(file) + if (.Platform$OS.type == "windows") { + new.mPath <- gsub("\\\\", "/", utils::shortPathName(new.mPath)) + } has_space <- grepl(" ", new.mPath) - if (has_space == T) { + if (has_space == TRUE) { stop("Error: User-defined directory has space which will throw error for .dll/.so compilation") } diff --git a/man/Model-class.Rd b/man/Model-class.Rd index cb31ee2..091f95e 100644 --- a/man/Model-class.Rd +++ b/man/Model-class.Rd @@ -65,8 +65,8 @@ expression \code{mod$updateParms()}. Use the \code{createModel()} function to cr \item{\code{runModel(times, ...)}}{Perform a simulation for the Model object using the \code{deSolve} function \code{ode} for the specified \code{times}.} -\item{\code{updateParms(new_parms = NULL)}}{Update values of parameters for the Model object.} +\item{\code{updateParms(new_parms = NULL)}}{Reset the values of the parameters for the Model object to their default values and then update the values of any parameters named in the argument `new_parms` using values provided in that argument.} -\item{\code{updateY0(new_states = NULL)}}{Update values of initial conditions of state variables for the Model object.} +\item{\code{updateY0(new_states = NULL)}}{Reset the values of the initial conditions of state variables for the Model object to their default values and then update the values of the initial conditions of any state variables named in the argument `new_states` using values provided in that argument.} }}