diff --git a/NAMESPACE b/NAMESPACE index 68dfa61..100a8b4 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,6 @@ # Generated by roxygen2: do not edit by hand -S3method("$",ggplot) +S3method("$",ggplot1) S3method("update<-",categorical) S3method("update<-",continuous) S3method("update<-",gradient) @@ -48,7 +48,7 @@ S3method(output,scale_cont_colour) S3method(output,scales) S3method(print,categorical) S3method(print,continuous) -S3method(print,ggplot) +S3method(print,ggplot1) S3method(print,gradient) S3method(print,manual) S3method(print,options) @@ -59,7 +59,7 @@ S3method(range,continuous) S3method(range,ps_double) S3method(range,scale) S3method(range,scales) -S3method(summary,ggplot) +S3method(summary,ggplot1) export("%>%") export(alpha) export(chop) diff --git a/R/options.r b/R/options.r index 9dc2b74..25b3560 100644 --- a/R/options.r +++ b/R/options.r @@ -102,7 +102,7 @@ ggtheme <- function(theme) { } #' @export -"$.ggplot" <- function(x, i) { +"$.ggplot1" <- function(x, i) { if (i %in% names(x)) { x[[i]] } else { diff --git a/R/plot.r b/R/plot.r index b5314e8..7a3d56b 100644 --- a/R/plot.r +++ b/R/plot.r @@ -146,7 +146,7 @@ ggplot.default <- function(data = NULL, aesthetics=list(), formula = . ~ ., marg defaults = uneval(substitute(aesthetics)), title = "", fixedaspect = FALSE - ), class="ggplot") + ), class="ggplot1") p$xlabel <- if (!is.null(p$defaults$x)) deparse(p$defaults$x) else "" p$ylabel <- if (!is.null(p$defaults$y)) deparse(p$defaults$y) else "" @@ -157,7 +157,7 @@ ggplot.default <- function(data = NULL, aesthetics=list(), formula = . ~ ., marg #' @export -print.ggplot <- function(x, newpage = is.null(vp), vp = NULL, save=ggopt()$save, ...) { +print.ggplot1 <- function(x, newpage = is.null(vp), vp = NULL, save=ggopt()$save, ...) { if (newpage) grid.newpage() if (is.null(vp)) { grid.draw(ggplot_plot(x, ...)) diff --git a/R/summary.r b/R/summary.r index 48bcd96..85978e8 100644 --- a/R/summary.r +++ b/R/summary.r @@ -1,5 +1,5 @@ #' @export -summary.ggplot <- function(object, ...) { +summary.ggplot1 <- function(object, ...) { defaults <- function() { paste(mapply(function(x, n) { paste(n, deparse(x), sep="=")