Skip to content

Commit

Permalink
updates to pass R CMD check.
Browse files Browse the repository at this point in the history
  • Loading branch information
clauswilke committed Jun 30, 2015
1 parent b9cef5a commit 99a289c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
9 changes: 6 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ Description: Some helpful extensions and modifications to the 'ggplot2'
package name, which stands for Claus O. Wilke's plot library.
URL: https://github.com/wilkelab/cowplot
Depends:
R (>= 3.0.0),
ggplot2 (>= 1.0.0)
R (>= 3.2.0),
ggplot2 (>= 1.0.0),
Imports:
grid (>= 3.0.0),
gtable (>= 0.1.2),
plyr (>= 1.8.2)
plyr (>= 1.8.2),
grDevices,
methods,
utils
License: GPL-2
LazyData: true
Suggests:
Expand Down
2 changes: 1 addition & 1 deletion R/draw.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# ****** Internal functions used by drawing code ******
ggplot_to_gtable <- function(plot)
{
if (is(plot, "ggplot")){
if (methods::is(plot, "ggplot")){
ggplot2::ggplotGrob(plot)
}
else if (is(plot, "gtable")){
Expand Down
4 changes: 2 additions & 2 deletions R/save.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#' @export
ggsave <- function(filename = NULL, plot = ggplot2::last_plot(),
device = default_device(filename), path = NULL, scale = 1,
width = par("din")[1], height = par("din")[2], units = c("in", "cm", "mm"),
width = graphics::par("din")[1], height = graphics::par("din")[2], units = c("in", "cm", "mm"),
dpi = 300, limitsize = TRUE, ...) {
# this code is copied directly from ggplot2. ugly, but
# the only way to implement this properly.
Expand Down Expand Up @@ -109,7 +109,7 @@ ggsave <- function(filename = NULL, plot = ggplot2::last_plot(),
filename <- file.path(path, filename)
}
device(file=filename, width=width, height=height, ...)
on.exit(capture.output(dev.off()))
on.exit(utils::capture.output(grDevices::dev.off()))
print(plot)

invisible()
Expand Down
4 changes: 2 additions & 2 deletions man/ggsave.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
\usage{
ggsave(filename = NULL, plot = ggplot2::last_plot(),
device = default_device(filename), path = NULL, scale = 1,
width = par("din")[1], height = par("din")[2], units = c("in", "cm",
"mm"), dpi = 300, limitsize = TRUE, ...)
width = graphics::par("din")[1], height = graphics::par("din")[2],
units = c("in", "cm", "mm"), dpi = 300, limitsize = TRUE, ...)
}
\arguments{
\item{filename}{Filename of plot}
Expand Down

0 comments on commit 99a289c

Please sign in to comment.