Skip to content

Commit

Permalink
Export ggsave from ggplot2
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey Girard committed Jun 8, 2018
1 parent 7146b48 commit ad5c5a4
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 7 deletions.
5 changes: 1 addition & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

S3method(print,ssm)
export("%>%")
export(ggsave)
export(ssm_measures)
export(ssm_parameters)
export(ssm_profiles)
Expand All @@ -14,10 +15,6 @@ importFrom(assertthat,is.flag)
importFrom(assertthat,is.scalar)
importFrom(assertthat,not_empty)
importFrom(ggplot2,aes)
importFrom(ggplot2,element_blank)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,ggsave)
importFrom(ggplot2,xlab)
importFrom(ggplot2,ylab)
importFrom(magrittr,"%>%")
useDynLib(ssm, .registration = TRUE)
4 changes: 2 additions & 2 deletions R/output_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ diff_plot <- function(.ssm_object) {
ggplot2::theme_bw() +
ggplot2::theme(
legend.position = "top",
axis.text.x = element_blank(),
axis.title.x = element_blank()
axis.text.x = ggplot2::element_blank(),
axis.title.x = ggplot2::element_blank()
) +
ggplot2::geom_pointrange(
aes(
Expand Down
2 changes: 1 addition & 1 deletion R/ssm.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NULL
#' are_equal assert_that is.count is.flag not_empty is.scalar
NULL

#' @importFrom ggplot2 aes element_blank ggplot ggsave xlab ylab
#' @importFrom ggplot2 aes
NULL

#' @useDynLib ssm, .registration = TRUE
Expand Down
13 changes: 13 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@
#' @usage lhs \%>\% rhs
NULL

#' Save a ggplot with sensible defaults
#'
#' See \code{ggplot2} for details.
#'
#' @name ggsave
#' @rdname ggsave
#' @keywords internal
#' @export
#' @importFrom ggplot2 ggsave
#' @usage ggsave(filename, width = NA, height = NA, units = c("in", "cm", "mm"),
#' dpi = 300, ...)
NULL

#' Compute differences between two sets of SSM parameters
#'
#' @param p1,p2 Outputs from \code{ssm_parameters()}.
Expand Down
13 changes: 13 additions & 0 deletions man/ggsave.Rd

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

0 comments on commit ad5c5a4

Please sign in to comment.