Skip to content

Commit

Permalink
Merge pull request #1065 from metrumresearchgroup/fix/generics
Browse files Browse the repository at this point in the history
Fix generic signature problems identified with new R-devel
  • Loading branch information
kylebaron authored Mar 9, 2023
2 parents 263773f + 6e9a361 commit 5b20384
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: mrgsolve
Title: Simulate from ODE-Based Models
Version: 1.0.8.9000
Version: 1.0.8.9001
Authors@R:
c(person(given = "Kyle T", family = "Baron",
role = c("aut", "cre"),
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# mrgsolve (development version)

- Fix signatures for `compiled.mrgmod()` and `as_tibble.mrgsims()` based on new
R-devel check findings (#1065).

# mrgsolve 1.0.8

- `SIGMA()` is a new model macro which allows users to access on-diagonal
Expand Down
4 changes: 2 additions & 2 deletions R/compile.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2013 - 2019 Metrum Research Group, LLC
# Copyright (C) 2013 - 2023 Metrum Research Group
#
# This file is part of mrgsolve.
#
Expand Down Expand Up @@ -130,7 +130,7 @@ compiled <- function(x,...) UseMethod("compiled")
#' @export
compiled.default <- function(x,...) return(FALSE)
#' @export
compiled.mrgmod <- function(x,status=NULL) {
compiled.mrgmod <- function(x, status = NULL, ...) {
if(is.null(status)) return(x@shlib$compiled)
x@shlib$compiled <- status
return(x)
Expand Down
16 changes: 9 additions & 7 deletions R/mrgsims.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,18 @@ slice.mrgsims <- function(.data,...) {
}

##' @rdname mrgsims_dplyr
##' @param .data_ mrgsims object
##' @export
as_data_frame.mrgsims <- function(.data_,...) {
as_tibble(as.data.frame(.data_),...)
as_data_frame.mrgsims <- function(x,...) {
as_tibble(as.data.frame(x),...)
}

##' @rdname mrgsims_dplyr
##' @export
as_tibble.mrgsims <- function(.data_,...) {
as_tibble(as.data.frame(.data_),...)

#' @param x mrgsims object.
#'
#' @rdname mrgsims_dplyr
#' @export
as_tibble.mrgsims <- function(x, ...) {
as_tibble(as.data.frame(x), ...)
}

#' @rdname mrgsims_dplyr
Expand Down
8 changes: 3 additions & 5 deletions man/mrgsims_dplyr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5b20384

Please sign in to comment.