Skip to content

Commit

Permalink
Merge pull request #635 from metrumresearchgroup/release/0.10.1
Browse files Browse the repository at this point in the history
Release/0.10.1
  • Loading branch information
kylebaron authored Feb 21, 2020
2 parents f2d779e + 73ca5f8 commit d73156f
Show file tree
Hide file tree
Showing 163 changed files with 1,563 additions and 2,190 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Doxygen
doxyfile
man/figures/README-.*\.png$
README.html
DOCS/
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Doxygen
DOCS
mrgsolve.Rcheck
.DS_store
Expand All @@ -11,3 +12,4 @@ Rchecks
*.tar.gz
!package/*.tar.gz
*00_pkg_src
inst/maintenance/unit/tests.md
75 changes: 48 additions & 27 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,22 +1,39 @@
Package: mrgsolve
Type: Package
Version: 0.10.0
Package: mrgsolve
Title: Simulate from ODE-Based Models
Authors@R: c(
person("Kyle T", "Baron", email = "kyleb@metrumrg.com", role=c("aut", "cre"), comment=c(ORCID="0000-0001-7252-5656")),
person("Bill", "Gillespie", role = "ctb"),
person("Charles", "Margossian", role = "ctb"),
person("Devin", "Pastoor", role = "ctb"),
person("Bill", "Denney", role = "ctb", comment=c(ORCID="0000-0002-5759-428X")),
person("Dilawar", "Singh", role = "ctb"),
person("Metrum Research Group", role = "cph")
)
Maintainer: Kyle T Baron <kyleb@metrumrg.com>
URL: https://github.com/metrumresearchgroup/mrgsolve
BugReports: https://github.com/metrumresearchgroup/mrgsolve/issues
Description: Fast simulation from ordinary differential equation (ODE) based
models typically employed in quantitative pharmacology and systems biology.
Version: 0.10.1
Authors@R:
c(person(given = "Kyle T",
family = "Baron",
role = c("aut", "cre"),
email = "kyleb@metrumrg.com",
comment = c(ORCID = "0000-0001-7252-5656")),
person(given = "Bill",
family = "Gillespie",
role = "ctb"),
person(given = "Charles",
family = "Margossian",
role = "ctb"),
person(given = "Devin",
family = "Pastoor",
role = "ctb"),
person(given = "Bill",
family = "Denney",
role = "ctb",
comment = c(ORCID = "0000-0002-5759-428X")),
person(given = "Dilawar",
family = "Singh",
role = "ctb"),
person(given = "Metrum Research Group",
role = "cph"))
Maintainer: Kyle T Baron <kyleb@metrumrg.com>
Description: Fast simulation from ordinary differential equation
(ODE) based models typically employed in quantitative pharmacology and
systems biology.
License: GPL (>=2)
URL: https://github.com/metrumresearchgroup/mrgsolve
BugReports:
https://github.com/metrumresearchgroup/mrgsolve/issues
Depends:
R (>= 3.1.2),
methods
Expand All @@ -26,23 +43,28 @@ Imports:
magrittr (>= 1.5),
RcppArmadillo (>= 0.7.900.2.0),
tibble (>= 2.1.1),
rlang (>= 0.3.4),
tidyselect (>= 0.2.5)
LinkingTo:
Rcpp (>= 0.12.12),
RcppArmadillo (>= 0.7.900.2.0),
BH (>= 1.62.0-1)
rlang (>= 0.3.4),
tidyselect (>= 0.2.5),
lifecycle,
glue
Suggests:
lattice,
testthat,
xml2 (>= 1.2.0),
rmarkdown,
yaml,
rmarkdown,
yaml,
knitr
LazyLoad: yes
NeedsCompilation: yes
LinkingTo:
Rcpp (>= 0.12.12),
RcppArmadillo (>= 0.7.900.2.0),
BH (>= 1.62.0-1)
RdMacros:
lifecycle
Encoding: UTF-8
Language: en-US
LazyLoad: yes
NeedsCompilation: yes
RoxygenNote: 7.0.2
SystemRequirements: C++11
Collate:
'RcppExports.R'
Expand Down Expand Up @@ -92,4 +114,3 @@ Collate:
'render.R'
'update.R'
'workflows.R'
RoxygenNote: 6.1.1
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ doc:
Rscript inst/maintenance/doc_mrgsolve.R

build:
R CMD build --md5 $(PKGDIR)
R CMD build --md5 $(PKGDIR) --no-manual

install:
R CMD INSTALL --install-tests ${TARBALL} -l ~/Rlibs
Expand All @@ -83,7 +83,7 @@ check:
make house
make doc
make build
R CMD check ${TARBALL} -o ${CHKDIR}
R CMD check ${TARBALL} -o ${CHKDIR} --no-manual
make unit

qcheck:
Expand Down Expand Up @@ -134,4 +134,7 @@ check-win:
check-winhub:
Rscript -e 'rhub::check_on_windows()'

.PHONY: doxygen
doxygen:
doxygen doxyfile

11 changes: 11 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Generated by roxygen2: do not edit by hand

S3method(.DollarNames,mrgmod)
S3method(.DollarNames,mrgsims)
S3method(Req,mrgmod)
S3method(all,equal.mrgmod)
S3method(as.data.frame,ev)
S3method(as.environment,mrgmod)
S3method(as.matrix,ev)
S3method(as.tbl,mrgsims)
S3method(as_tibble,mrgsims)
Expand Down Expand Up @@ -59,6 +62,7 @@ S3method(summarise,each)
S3method(summarise,mrgsims)
S3method(summary,mrgmod)
S3method(summary,mrgsims)
S3method(within,mrgmod)
export("%>%")
export("%then%")
export(Req)
Expand Down Expand Up @@ -104,6 +108,7 @@ export(expand_observations)
export(file_show)
export(filter)
export(filter_sims)
export(house)
export(idata_set)
export(init)
export(inventory)
Expand Down Expand Up @@ -137,6 +142,7 @@ export(numerics_only)
export(obsaug)
export(obsonly)
export(omat)
export(outvars)
export(parse_rx)
export(plot_sims)
export(qsim)
Expand All @@ -146,6 +152,7 @@ export(req)
export(revar)
export(s_)
export(see)
export(select_sims)
export(simargs)
export(smat)
export(soloc)
Expand Down Expand Up @@ -235,11 +242,14 @@ importFrom(dplyr,summarise)
importFrom(dplyr,summarise_at)
importFrom(dplyr,summarise_each)
importFrom(dplyr,ungroup)
importFrom(glue,glue)
importFrom(lifecycle,deprecate_soft)
importFrom(magrittr,"%>%")
importFrom(magrittr,"%T>%")
importFrom(rlang,"!!!")
importFrom(rlang,"!!")
importFrom(rlang,enquo)
importFrom(rlang,enquos)
importFrom(rlang,eval_tidy)
importFrom(rlang,quo_name)
importFrom(rlang,quos)
Expand All @@ -250,6 +260,7 @@ importFrom(stats,setNames)
importFrom(tibble,as_tibble)
importFrom(tibble,tibble)
importFrom(tidyselect,vars_select)
importFrom(utils,.DollarNames)
importFrom(utils,assignInMyNamespace)
importFrom(utils,capture.output)
importFrom(utils,example)
Expand Down
23 changes: 23 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# mrgsolve 0.10.1

- Add `select_sims` method for selecting columns in `mrgsims` object #585
- Fix bug where system was improperly advanced on steady state dosing record
with a lag time when the system failed to reach steady state #596
- Add better compartment level control for advancing system to steady state #598
- Allow user to set `CXX_FLAGS` in `$ENV` block #603
- Add `N_CMT` plugin so that the number (index) of every compartment is available
by name (e.g. `N_CENT` for the number index of the central compartment) #606
- Fix bug where `blocks()` failed when the model was defined in `Rmd` file #608
- Call ODE block every time the system tries to advance so that variables
calculated in ODE are properly calculated in output #613
- Add `within` method for mrgmod #616
- Access initial compartment values and other model object items with `$`
operator for `mrgmod` #620
- Add plot method for signature `c("mrgsims", "character")`; pass in a character
vector of outputs to plot #630
- The house model, previously accessible by `mrgsolve:::house()` is now an
exported function #625
- Exporting outvars function to extract names of current output variables from
the model object
- Now importing lifecycle and glue packages

# mrgsolve 0.10.0

- Remove `qsim` and all associated functions
Expand Down
75 changes: 39 additions & 36 deletions R/Aaaa.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2013 - 2019 Metrum Research Group
# Copyright (C) 2013 - 2020 Metrum Research Group
#
# This file is part of mrgsolve.
#
Expand All @@ -15,43 +15,46 @@
# You should have received a copy of the GNU General Public License
# along with mrgsolve. If not, see <http://www.gnu.org/licenses/>.

##' @import methods
##'
##' @importFrom utils capture.output example str type.convert
##' @importFrom utils packageVersion assignInMyNamespace read.table
##' @importFrom stats as.formula setNames rnorm
##' @importFrom dplyr filter
##' @importFrom dplyr mutate slice as.tbl pull
##' @importFrom dplyr bind_rows arrange summarise summarise_at
##' @importFrom dplyr intersect select rename slice distinct do
##' @importFrom dplyr distinct first select_vars_
##' @importFrom dplyr select_vars everything
##' @importFrom dplyr if_else mutate_at summarise_each is.tbl select
##' @importFrom dplyr mutate_all group_by ungroup n
##' @importFrom dplyr data_frame as_data_frame
##' @importFrom tidyselect vars_select
##' @importFrom magrittr %>% %T>%
##' @importFrom Rcpp evalCpp
##' @importFrom RcppArmadillo armadillo_version
##' @importFrom tibble tibble as_tibble
##' @importFrom rlang quos enquo quo_name syms !!! !! eval_tidy
##'
##' @include Aaaa.R
##' @include class_mrgsims.R
##' @include class_mrgmod.R
##' @include class_derived.R
##' @include class_ev.R
##' @include class_matlist.R
##' @include class_numericlist.R
##' @include class_tgrid.R
##' @include generics.R
##' @include package.R
##' @include utils.R
##' @include RcppExports.R
##'
#' @import methods
#'
#' @importFrom utils capture.output example str type.convert
#' @importFrom utils packageVersion assignInMyNamespace read.table
#' @importFrom utils .DollarNames
#' @importFrom stats as.formula setNames rnorm
#' @importFrom dplyr filter
#' @importFrom dplyr mutate slice as.tbl pull
#' @importFrom dplyr bind_rows arrange summarise summarise_at
#' @importFrom dplyr intersect select rename slice distinct do
#' @importFrom dplyr distinct first select_vars_
#' @importFrom dplyr select_vars everything
#' @importFrom dplyr if_else mutate_at summarise_each is.tbl select
#' @importFrom dplyr mutate_all group_by ungroup n
#' @importFrom dplyr data_frame as_data_frame
#' @importFrom tidyselect vars_select
#' @importFrom magrittr %>% %T>%
#' @importFrom Rcpp evalCpp
#' @importFrom RcppArmadillo armadillo_version
#' @importFrom tibble tibble as_tibble
#' @importFrom rlang quos enquo enquos quo_name syms !!! !! eval_tidy
#' @importFrom lifecycle deprecate_soft
#' @importFrom glue glue
#'
#' @include Aaaa.R
#' @include class_mrgsims.R
#' @include class_mrgmod.R
#' @include class_derived.R
#' @include class_ev.R
#' @include class_matlist.R
#' @include class_numericlist.R
#' @include class_tgrid.R
#' @include generics.R
#' @include package.R
#' @include utils.R
#' @include RcppExports.R
#'
NULL

##' @export
#' @export
dplyr::filter

GLOBALS <- new.env()
Expand Down
12 changes: 8 additions & 4 deletions R/annot.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,16 @@ parse_annot_line <- function(x, novalue=FALSE, noname=FALSE,context="not given")
x <- mytriml(x)

if(nchar(x)==0) return(NULL)

col <- charcount(x,":")[1]

if(col != (2-noname-novalue)) {
stop("improper annotation format ", x,"\n",
" Context: ", context, call.=FALSE)
stop(
"improper annotation format\n",
" input: ", x, "\n",
" context: ", context,
call.=FALSE
)
}

## Fix up line if not name : value : other
Expand Down Expand Up @@ -100,7 +104,7 @@ parse_annot_line <- function(x, novalue=FALSE, noname=FALSE,context="not given")
##' with \code{mrgsolve:::details()}.
##'
##' @examples
##' mod <- mrgsolve:::house()
##' mod <- mrgsolve::house()
##'
##' mrgsolve:::details(mod)
##'
Expand Down
6 changes: 3 additions & 3 deletions R/chain.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
##' strictly for compartments.
##'
##' @examples
##' mod <- mrgsolve:::house()
##' mod <- mrgsolve::house()
##'
##' mod %>% Req(CP,RESP) %>% ev(amt=1000) %>% mrgsim
##'
Expand Down Expand Up @@ -108,7 +108,7 @@ carry.out <- function(x,...) {
##'
##' @examples
##' # The model is in hours:
##' mod <- mrgsolve:::house()
##' mod <- mrgsolve::house()
##'
##' # The output is in days:
##' mod %>% tscale(1/24) %>% mrgsim
Expand Down Expand Up @@ -187,7 +187,7 @@ obsaug <- function(x,value=TRUE,...) {
##'
##' idata <- data[,c("ID", "amt")]
##'
##' mod <- mrgsolve:::house()
##' mod <- mrgsolve::house()
##'
##' mod %>%
##' omat(dmat(1,1,1,1)) %>%
Expand Down
Loading

0 comments on commit d73156f

Please sign in to comment.