Skip to content

Commit

Permalink
Reverting #697
Browse files Browse the repository at this point in the history
  • Loading branch information
Puzzled-Face committed Oct 27, 2023
1 parent a25d682 commit 4df243a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Generated by roxygen2: do not edit by hand

S3method(plot,gtable)
S3method(print,gtable)
export("%>%")
export(.CohortSizeConst)
export(.CohortSizeDLT)
Expand Down Expand Up @@ -565,6 +567,7 @@ importFrom(graphics,lines)
importFrom(graphics,matlines)
importFrom(graphics,matplot)
importFrom(graphics,plot)
importFrom(grid,grid.draw)
importFrom(gridExtra,arrangeGrob)
importFrom(kableExtra,add_footnote)
importFrom(kableExtra,add_header_above)
Expand Down
18 changes: 18 additions & 0 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,24 @@ crmPackHelp <- function() {
utils::help(package = "crmPack", help_type = "html")
}

## this is the new version, working on the gtable objects:
##' Plots gtable objects
##'
##' @method plot gtable
##' @param x the gtable object
##' @param \dots additional parameters for \code{\link[grid]{grid.draw}}
##'
##' @importFrom grid grid.draw
##' @export
plot.gtable <- function(x, ...) {
grid::grid.draw(x, ...)
}

##' @export
print.gtable <- function(x, ...) {
plot.gtable(x, ...)
}

##' Taken from utils package (print.vignette)
##'
##' @importFrom tools file_ext
Expand Down
16 changes: 16 additions & 0 deletions man/plot.gtable.Rd

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

4 changes: 2 additions & 2 deletions man/simulate-DesignGrouped-method.Rd

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

0 comments on commit 4df243a

Please sign in to comment.