Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed xxx.r (build_accessor file) and @name tags, added functions t…

…o geoms/positions/stats
  • Loading branch information...
commit ede677cb172b90af7c8f1cb3d973429a0c03171e 1 parent b5edd86
@JakeRuss JakeRuss authored
Showing with 417 additions and 136 deletions.
  1. +0 −1  DESCRIPTION
  2. +5 −2 R/geom-abline.r
  3. +5 −2 R/geom-bar-.r
  4. +4 −1 R/geom-bar-histogram.r
  5. +5 −2 R/geom-bin2d.r
  6. +4 −1 R/geom-blank.r
  7. +7 −1 R/geom-boxplot.r
  8. +7 −2 R/geom-crossbar.r
  9. +5 −2 R/geom-error.r
  10. +5 −2 R/geom-errorh.r
  11. +10 −7 R/geom-freqpoly.r
  12. +5 −2 R/geom-hex.r
  13. +4 −1 R/geom-hline.r
  14. +4 −1 R/geom-linerange.r
  15. +6 −1 R/geom-path-.r
  16. +6 −1 R/geom-path-contour.r
  17. +7 −2 R/geom-path-density2d.r
  18. +4 −1 R/geom-path-line.r
  19. +6 −1 R/geom-path-step.r
  20. +6 −1 R/geom-point-jitter.r
  21. +4 −1 R/geom-pointrange.r
  22. +4 −1 R/geom-polygon.r
  23. +6 −1 R/geom-quantile.r
  24. +4 −1 R/geom-rect.r
  25. +13 −3 R/geom-ribbon-.r
  26. +6 −1 R/geom-ribbon-density.r
  27. +4 −1 R/geom-rug.r
  28. +4 −1 R/geom-segment.r
  29. +4 −1 R/geom-smooth.r
  30. +6 −1 R/geom-text.r
  31. +4 −1 R/geom-tile.r
  32. +4 −1 R/geom-vline.r
  33. +4 −1 R/position-dodge.r
  34. +4 −1 R/position-fill.r
  35. +4 −1 R/position-identity.r
  36. +4 −1 R/position-jitter.r
  37. +4 −1 R/position-stack.r
  38. +6 −1 R/stat-bin.r
  39. +6 −1 R/stat-bin2d.r
  40. +6 −1 R/stat-binhex.r
  41. +6 −1 R/stat-boxplot.r
  42. +6 −1 R/stat-contour.r
  43. +6 −1 R/stat-density-2d.r
  44. +6 −1 R/stat-density.r
  45. +6 −1 R/stat-function.r
  46. +5 −1 R/stat-identity.r
  47. +6 −2 R/stat-qq.r
  48. +8 −1 R/stat-quantile.r
  49. +8 −1 R/stat-smooth.r
  50. +4 −1 R/stat-spoke.r
  51. +4 −1 R/stat-sum.r
  52. +4 −1 R/stat-summary.r
  53. +4 −1 R/stat-unique.r
  54. +16 −3 R/stat-vline.r
  55. +0 −57 R/xxx.r
  56. +2 −0  man/geom_abline.Rd
  57. +2 −0  man/geom_area.Rd
  58. +1 −0  man/geom_bar.Rd
  59. +2 −0  man/geom_bin2d.Rd
  60. +2 −0  man/geom_blank.Rd
  61. +3 −0  man/geom_boxplot.Rd
  62. +3 −0  man/geom_contour.Rd
  63. +2 −0  man/geom_crossbar.Rd
  64. +2 −0  man/geom_density.Rd
  65. +3 −0  man/geom_density2d.Rd
  66. +2 −0  man/geom_errorbar.Rd
  67. +2 −0  man/geom_errorbarh.Rd
  68. +8 −6 man/geom_freqpoly.Rd
  69. +2 −0  man/geom_hex.Rd
  70. +2 −0  man/geom_histogram.Rd
  71. +2 −0  man/geom_hline.Rd
  72. +2 −0  man/geom_jitter.Rd
  73. +2 −0  man/geom_line.Rd
  74. +2 −0  man/geom_linerange.Rd
  75. +3 −0  man/geom_path.Rd
  76. +2 −0  man/geom_pointrange.Rd
  77. +2 −0  man/geom_polygon.Rd
  78. +3 −0  man/geom_quantile.Rd
  79. +2 −0  man/geom_rect.Rd
  80. +2 −0  man/geom_ribbon.Rd
  81. +2 −0  man/geom_rug.Rd
  82. +2 −0  man/geom_segment.Rd
  83. +2 −0  man/geom_smooth.Rd
  84. +2 −0  man/geom_step.Rd
  85. +2 −0  man/geom_text.Rd
  86. +2 −0  man/geom_tile.Rd
  87. +2 −0  man/geom_vline.Rd
  88. +1 −0  man/position_dodge.Rd
  89. +1 −0  man/position_fill.Rd
  90. +1 −0  man/position_identity.Rd
  91. +1 −0  man/position_jitter.Rd
  92. +1 −0  man/position_stack.Rd
  93. +2 −0  man/stat_abline.Rd
  94. +2 −0  man/stat_bin.Rd
  95. +2 −0  man/stat_bin2d.Rd
  96. +2 −0  man/stat_binhex.Rd
  97. +2 −0  man/stat_boxplot.Rd
  98. +2 −0  man/stat_contour.Rd
  99. +3 −0  man/stat_density.Rd
  100. +3 −0  man/stat_density2d.Rd
  101. +2 −0  man/stat_function.Rd
  102. +2 −0  man/stat_hline.Rd
  103. +2 −0  man/stat_identity.Rd
  104. +2 −0  man/stat_qq.Rd
  105. +3 −0  man/stat_quantile.Rd
  106. +4 −0 man/stat_smooth.Rd
  107. +2 −0  man/stat_spoke.Rd
  108. +2 −0  man/stat_sum.Rd
  109. +2 −0  man/stat_summary.Rd
  110. +2 −0  man/stat_unique.Rd
  111. +2 −0  man/stat_vline.Rd
View
1  DESCRIPTION
@@ -156,5 +156,4 @@ Collate:
'utilities.r'
'xxx-codegen.r'
'xxx-digest.r'
- 'xxx.r'
'zxx.r'
View
7 R/geom-abline.r
@@ -10,8 +10,7 @@
#' (\code{geom_abline(intercept=0, slope=1)}) then the line will be the same
#' in all panels. If the intercept and slope are stored in the data, then
#' they can vary from panel to panel. See the examples for more ideas.
-#'
-#' @name geom_abline
+#'
#' @seealso \code{\link{stat_smooth}} to add lines derived from the data,
#' \code{\link{geom_hline}} for horizontal lines,
#' \code{\link{geom_vline}} for vertical lines
@@ -49,6 +48,10 @@
#' # It's actually a bit easier to do this with stat_smooth
#' p + geom_smooth(aes(group=cyl), method="lm")
#' p + geom_smooth(aes(group=cyl), method="lm", fullrange=TRUE)
+geom_abline <- function (mapping = NULL, data = NULL, stat = "abline", position = "identity", ...) {
+ GeomAbline$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomAbline <- proto(Geom, {
objname <- "abline"
View
7 R/geom-bar-.r
@@ -28,8 +28,7 @@
#' Naomi Robbins has a nice
#' \href{http://www.b-eye-network.com/view/index.php?cid=2468}{article on this topic}.
#' This is the reason it doesn't make sense to use a log-scaled y axis with a bar chart
-#'
-#' @name geom_bar
+#'
#' @seealso \code{\link{stat_bin}} for more details of the binning alogirithm,
#' \code{\link{position_dodge}} for creating side-by-side barcharts,
#' \code{\link{position_stack}} for more info on stacking,
@@ -103,6 +102,10 @@
#' "suv", "compact", "2seater", "subcompact", "pickup"))
#' m <- ggplot(mpg, aes(manufacturer, fill=class))
#' m + geom_bar()
+geom_bar <- function (mapping = NULL, data = NULL, stat = "bin", position = "stack", ...) {
+ GeomBar$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomBar <- proto(Geom, {
objname <- "bar"
View
5 R/geom-bar-histogram.r
@@ -9,7 +9,6 @@
#' may need to look at a few to uncover the full story behind your data.
#'
#'
-#' @name geom_histogram
#' @export
#' @examples
#' # Simple examples
@@ -104,6 +103,10 @@
#' # Which looks better when the distributions are more distinct
#' ggplot(diamonds, aes(depth, fill = cut)) +
#' geom_density(alpha = 0.2) + xlim(55, 70)
+geom_histogram <- function (mapping = NULL, data = NULL, stat = "bin", position = "stack", ...) {
+ GeomHistogram$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomHistogram <- proto(GeomBar, {
objname <- "histogram"
View
7 R/geom-bin2d.r
@@ -1,6 +1,5 @@
#' Add heatmap of 2d bin counts.
-#'
-#' @name geom_bin2d
+#'
#' @export
#' @examples
#' d <- ggplot(diamonds, aes(x = x, y = y)) + xlim(4,10) + ylim(4,10)
@@ -8,6 +7,10 @@
#' d + geom_bin2d(binwidth = c(0.1, 0.1))
#'
#' # See ?stat_bin2d for more examples
+geom_bin2d <- function (mapping = NULL, data = NULL, stat = "bin2d", position = "identity", ...) {
+ GeomBin2d$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomBin2d <- proto(Geom, {
draw <- function(., data, scales, coordinates, ...) {
GeomRect$draw(data, scales, coordinates, ...)
View
5 R/geom-blank.r
@@ -3,11 +3,14 @@
#' The blank geom draws nothing, but can be a useful way of ensuring common
#' scales between different plots.
#'
-#' @name geom_blank
#' @export
#' @examples
#' qplot(length, rating, data=movies, geom="blank")
#' # Nothing to see here!
+geom_blank <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity", ...) {
+ GeomBlank$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomBlank <- proto(Geom, {
objname <- "blank"
View
8 R/geom-boxplot.r
@@ -1,6 +1,5 @@
#' Box and whiskers plot.
#'
-#' @name geom_boxplot
#' @seealso \code{\link{stat_quantile}} to view quantiles conditioned on a
#' continuous variable, \code{\link{geom_jitter}} for another way to look
#' at conditional distributions"
@@ -58,6 +57,13 @@
#' b + geom_boxplot(stat = "identity")
#' b + geom_boxplot(stat = "identity") + coord_flip()
#' b + geom_boxplot(aes(fill = X1), stat = "identity")
+geom_boxplot <- function (mapping = NULL, data = NULL, stat = "boxplot", position = "dodge",
+outlier.colour = "black", outlier.shape = 16, outlier.size = 2, ...) {
+ GeomBoxplot$new(mapping = mapping, data = data, stat = stat,
+ position = position, outlier.colour = outlier.colour, outlier.shape = outlier.shape,
+ outlier.size = outlier.size, ...)
+}
+
GeomBoxplot <- proto(Geom, {
objname <- "boxplot"
View
9 R/geom-crossbar.r
@@ -1,6 +1,5 @@
#' Hollow bar with middle indicated by horizontal line.
-#'
-#' @name geom_crossbar
+#'
#' @param fatten a multiplicate factor to fatten middle bar by
#' @seealso \code{\link{geom_errorbar}} for error bars,
#' \code{\link{geom_pointrange}} and \code{\link{geom_linerange}} for other
@@ -9,6 +8,12 @@
#' @export
#' @examples
#' # See geom_linerange for examples
+geom_crossbar <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity",
+fatten = 2, ...) {
+ GeomCrossbar$new(mapping = mapping, data = data, stat = stat,
+ position = position, fatten = fatten, ...)
+}
+
GeomCrossbar <- proto(Geom, {
objname <- "crossbar"
View
7 R/geom-error.r
@@ -1,6 +1,5 @@
#' Error bars.
-#'
-#' @name geom_errorbar
+#'
#' @seealso \code{\link{geom_pointrange}}: range indicated by straight line,
#' with point in the middle; \code{\link{geom_linerange}}: range indicated
#' by straight line; \code{\link{geom_crossbar}}: hollow bar with middle
@@ -41,6 +40,10 @@
#' # groups which define the lines - here the groups in the
#' # original dataframe
#' p + geom_line(aes(group=group)) + geom_errorbar(limits, width=0.2)
+geom_errorbar <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity", ...) {
+ GeomErrorbar$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomErrorbar <- proto(Geom, {
objname <- "errorbar"
View
7 R/geom-errorh.r
@@ -1,6 +1,5 @@
#' Horizontal error bars
-#'
-#' @name geom_errorbarh
+#'
#' @seealso \code{\link{geom_errorbar}}: vertical error bars
#' @param height height of errorbars
#' @export
@@ -19,6 +18,10 @@
#' geom_errorbarh(aes(xmax = resp + se, xmin = resp - se))
#' p + geom_point() +
#' geom_errorbarh(aes(xmax = resp + se, xmin = resp - se, height = .2))
+geom_errorbarh <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity", ...) {
+ GeomErrorbarh$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomErrorbarh <- proto(Geom, {
objname <- "errorbarh"
View
17 R/geom-freqpoly.r
@@ -1,18 +1,21 @@
#' Frequency polygon.
#'
-#' @name geom_freqpoly
#' @seealso \code{\link{geom_histogram}}: histograms
#' @export
#' @examples
-#' qplot(carat, data = diamonds, geom="freqpoly")
-#' qplot(carat, data = diamonds, geom="freqpoly", binwidth = 0.1)
-#' qplot(carat, data = diamonds, geom="freqpoly", binwidth = 0.01)
+#' qplot(carat, data = diamonds, geom = "freqpoly")
+#' qplot(carat, data = diamonds, geom = "freqpoly", binwidth = 0.1)
+#' qplot(carat, data = diamonds, geom = "freqpoly", binwidth = 0.01)
#'
-#' qplot(price, data = diamonds, geom="freqpoly", binwidth = 1000)
-#' qplot(price, data = diamonds, geom="freqpoly", binwidth = 1000,
+#' qplot(price, data = diamonds, geom = "freqpoly", binwidth = 1000)
+#' qplot(price, data = diamonds, geom = "freqpoly", binwidth = 1000,
#' colour = color)
-#' qplot(price, ..density.., data = diamonds, geom="freqpoly",
+#' qplot(price, ..density.., data = diamonds, geom = "freqpoly",
#' binwidth = 1000, colour = color)
+geom_freqpoly <- function (mapping = NULL, data = NULL, stat = "bin", position = "identity", ...) {
+ GeomFreqpoly$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomFreqpoly <- proto(Geom, {
objname <- "freqpoly"
View
7 R/geom-hex.r
@@ -1,9 +1,12 @@
#' Hexagon bining.
-#'
-#' @name geom_hex
+#'
#' @export
#' @examples
#' # See ?stat_binhex for examples
+geom_hex <- function (mapping = NULL, data = NULL, stat = "binhex", position = "identity", ...) {
+ GeomHex$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomHex <- proto(Geom, {
objname <- "hex"
View
5 R/geom-hline.r
@@ -10,7 +10,6 @@
#' intercept for each panel using a data.frame. See the examples for the
#' differences
#'
-#' @name geom_hline
#' @seealso \code{\link{geom_vline}} for vertical lines,
#' \code{\link{geom_abline}} for lines defined by a slope and intercept,
#' \code{\link{geom_segment}} for a more general approach
@@ -28,6 +27,10 @@
#'
#' hline.data <- data.frame(z = 1:4, vs = c(0,0,1,1), am = c(0,1,0,1))
#' p + geom_hline(aes(yintercept = z), hline.data)
+geom_hline <- function (mapping = NULL, data = NULL, stat = "hline", position = "identity", ...) {
+ GeomHline$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomHline <- proto(Geom, {
objname <- "hline"
View
5 R/geom-linerange.r
@@ -1,6 +1,5 @@
#' An interval represented by a vertical line.
#'
-#' @name geom_linerange
#' @seealso \code{\link{geom_errorbar}}: error bars;
#' \code{\link{geom_pointrange}}: range indicated by straight line, with
#' point in the middle; \code{\link{geom_crossbar}}: hollow bar with middle
@@ -28,6 +27,10 @@
#'
#' # Use coord_flip to flip the x and y axes
#' se + geom_linerange() + coord_flip()
+geom_linerange <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity", ...) {
+ GeomLinerange$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomLinerange <- proto(Geom, {
objname <- "linerange"
View
7 R/geom-path-.r
@@ -1,6 +1,5 @@
#' Connect observations in original order
#'
-#' @name geom_path
#' @param lineend Line end style (round, butt, square)
#' @param linejoin Line join style (round, mitre, bevel)
#' @param linemitre Line mitre limit (number greater than 1)
@@ -87,6 +86,12 @@
#' # Arrow defaults to "last"
#' c + geom_path(arrow = arrow())
#' c + geom_path(arrow = arrow(angle = 15, ends = "both", length = unit(0.6, "inches")))
+geom_path <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity",
+lineend = "butt", linejoin = "round", linemitre = 1, na.rm = FALSE, ...) {
+ GeomPath$new(mapping = mapping, data = data, stat = stat, position = position,
+ lineend = lineend, linejoin = linejoin, linemitre = linemitre, na.rm = na.rm, ...)
+}
+
GeomPath <- proto(Geom, {
objname <- "path"
View
7 R/geom-path-contour.r
@@ -1,10 +1,15 @@
#' Display contours of a 3d surface in 2d.
#'
-#' @name geom_contour
#' @seealso \code{\link{geom_density2d}}: 2d density contours
#' @export
#' @examples
#' # See stat_contour for examples
+geom_contour <- function (mapping = NULL, data = NULL, stat = "contour", position = "identity",
+lineend = "butt", linejoin = "round", linemitre = 1, na.rm = FALSE, ...) {
+ GeomContour$new(mapping = mapping, data = data, stat = stat, position = position,
+ lineend = lineend, linejoin = linejoin, linemitre = linemitre, na.rm = na.rm, ...)
+}
+
GeomContour <- proto(GeomPath, {
objname <- "contour"
View
9 R/geom-path-density2d.r
@@ -4,13 +4,18 @@
#' results with contours.
#'
#' This can be useful for dealing with overplotting.
-#'
-#' @name geom_density2d
+#'
#' @seealso \code{\link{geom_contour}} for contour drawing geom,
#' \code{\link{stat_sum}} for another way of dealing with overplotting
#' @export
#' @examples
#' # See stat_density2d for examples
+geom_density2d <- function (mapping = NULL, data = NULL, stat = "density2d", position = "identity",
+lineend = "butt", linejoin = "round", linemitre = 1, na.rm = FALSE, ...) {
+ GeomDensity2d$new(mapping = mapping, data = data, stat = stat, position = position,
+ lineend = lineend, linejoin = linejoin, linemitre = linemitre, na.rm = na.rm, ...)
+}
+
GeomDensity2d <- proto(GeomPath, {
objname <- "density2d"
View
5 R/geom-path-line.r
@@ -1,6 +1,5 @@
#' Connect observations, ordered by x value.
#'
-#' @name geom_line
#' @seealso \code{\link{geom_path}}: connect observations in data order,
#' \code{\link{geom_segment}}: draw line segments,
#' \code{\link{geom_ribbon}}: fill between line and x-axis
@@ -56,6 +55,10 @@
#' dfm <- melt(df, id.var = c("id", "group"))
#' ggplot(dfm, aes(variable, value, group = id, colour = group)) +
#' geom_path(alpha = 0.5)
+geom_line <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity", ...) {
+ GeomLine$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomLine <- proto(GeomPath, {
objname <- "line"
View
7 R/geom-path-step.r
@@ -1,6 +1,5 @@
#' Connect observations by stairs.
#'
-#' @name geom_step
#' @param direction direction of stairs: 'vh' for vertical then horizontal, or
#' 'hv' for horizontal then vertical
#' @export
@@ -22,6 +21,12 @@
#' trt = sample(c("a", "b"), 50, rep = T)
#' )
#' qplot(seq_along(x), x, data = df, geom="step", colour = trt)
+geom_step <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity",
+direction = "hv", ...) {
+ GeomStep$new(mapping = mapping, data = data, stat = stat, position = position,
+ direction = direction, ...)
+}
+
GeomStep <- proto(Geom, {
objname <- "step"
View
7 R/geom-point-jitter.r
@@ -4,7 +4,6 @@
#' 'jitter'. See \code{\link{position_jitter}} to see how to adjust amount
#' of jittering.
#'
-#' @name geom_jitter
#' @seealso
#' \code{\link{geom_point}} for regular, unjittered points,
#' \code{\link{geom_boxplot}} for another way of looking at the conditional
@@ -28,6 +27,12 @@
#' qplot(mpaa, rating, data=movies, geom="jitter")
#' qplot(mpaa, rating, data=movies, geom=c("boxplot","jitter"))
#' qplot(mpaa, rating, data=movies, geom=c("jitter", "boxplot"))
+geom_jitter <- function (mapping = NULL, data = NULL, stat = "identity", position = "jitter",
+na.rm = FALSE, ...) {
+ GeomJitter$new(mapping = mapping, data = data, stat = stat, position = position,
+ na.rm = na.rm, ...)
+}
+
GeomJitter <- proto(GeomPoint, {
objname <- "jitter"
View
5 R/geom-pointrange.r
@@ -1,6 +1,5 @@
#' An interval represented by a vertical line, with a point in the middle.
#'
-#' @name geom_pointrange
#' @seealso
#' \code{\link{geom_errorbar}} for error bars,
#' \code{\link{geom_linerange}} for range indicated by straight line, + examples,
@@ -10,6 +9,10 @@
#' @export
#' @examples
#' # See geom_linerange for examples
+geom_pointrange <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity", ...) {
+ GeomPointrange$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomPointrange <- proto(Geom, {
objname <- "pointrange"
View
5 R/geom-polygon.r
@@ -1,6 +1,5 @@
#' Polygon, a filled path.
#'
-#' @name geom_polygon
#' @seealso
#' \code{\link{geom_path}} for an unfilled polygon,
#' \code{\link{geom_ribbon}} for a polygon anchored on the x-axis
@@ -43,6 +42,10 @@
#'
#' # And if the positions are in longitude and latitude, you can use
#' # coord_map to produce different map projections.
+geom_polygon <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity", ...) {
+ GeomPolygon$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomPolygon <- proto(Geom, {
objname <- "polygon"
View
7 R/geom-quantile.r
@@ -2,10 +2,15 @@
#'
#' This can be used as a continuous analogue of a geom_boxplot.
#'
-#' @name geom_quantile
#' @export
#' @examples
#' # See stat_quantile for examples
+geom_quantile <- function (mapping = NULL, data = NULL, stat = "quantile", position = "identity",
+lineend = "butt", linejoin = "round", linemitre = 1, na.rm = FALSE, ...) {
+ GeomQuantile$new(mapping = mapping, data = data, stat = stat, position = position,
+ lineend = lineend, linejoin = linejoin, linemitre = linemitre, na.rm = na.rm, ...)
+}
+
GeomQuantile <- proto(GeomPath, {
objname <- "quantile"
View
5 R/geom-rect.r
@@ -1,6 +1,5 @@
#' 2d rectangles.
#'
-#' @name geom_rect
#' @export
#' @examples
#' df <- data.frame(
@@ -9,6 +8,10 @@
#' )
#' ggplot(df, aes(xmin = x, xmax = x + 1, ymin = y, ymax = y + 2)) +
#' geom_rect()
+geom_rect <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity", ...) {
+ GeomRect$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomRect <- proto(Geom, {
objname <- "rect"
View
16 R/geom-ribbon-.r
@@ -1,6 +1,5 @@
#' Ribbons, y range with continuous x values.
-#'
-#' @name geom_ribbon
+#'
#' @seealso
#' \code{\link{geom_bar}} for discrete intervals (bars),
#' \code{\link{geom_linerange}} for discrete intervals (lines),
@@ -35,6 +34,12 @@
#'
#' # Use qplot instead
#' qplot(year, level, data=huron, geom=c("area", "line"))
+geom_ribbon <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity",
+na.rm = FALSE, ...) {
+ GeomRibbon$new(mapping = mapping, data = data, stat = stat, position = position,
+ na.rm = na.rm, ...)
+}
+
GeomRibbon <- proto(Geom, {
objname <- "ribbon"
@@ -99,10 +104,15 @@ GeomRibbon <- proto(Geom, {
#' minimum of the range is fixed to 0, and the position adjustment defaults
#' to position_stacked.
#'
-#' @name geom_area
#' @export
#' @examples
#' # see geom_ribbon
+geom_area <- function (mapping = NULL, data = NULL, stat = "identity", position = "stack",
+na.rm = FALSE, ...) {
+ GeomArea$new(mapping = mapping, data = data, stat = stat, position = position,
+ na.rm = na.rm, ...)
+}
+
GeomArea <- proto(GeomRibbon,{
objname <- "area"
View
7 R/geom-ribbon-density.r
@@ -3,10 +3,15 @@
#' A smooth density estimate calculated by \code{\link{stat_density}}.
#'
#' @seealso \code{\link{geom_histogram}} for the histogram
-#' @name geom_density
#' @export
#' @examples
#' # See stat_density for examples
+geom_density <- function (mapping = NULL, data = NULL, stat = "density", position = "identity",
+na.rm = FALSE, ...) {
+ GeomDensity$new(mapping = mapping, data = data, stat = stat, position = position,
+ na.rm = na.rm, ...)
+}
+
GeomDensity <- proto(GeomArea, {
objname <- "density"
View
5 R/geom-rug.r
@@ -1,12 +1,15 @@
#' Marginal rug plots.
#'
-#' @name geom_rug
#' @export
#' @examples
#' p <- ggplot(mtcars, aes(x=wt, y=mpg))
#' p + geom_point()
#' p + geom_point() + geom_rug()
#' p + geom_point() + geom_rug(position='jitter')
+geom_rug <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity", ...) {
+ GeomRug$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomRug <- proto(Geom, {
objname <- "rug"
View
5 R/geom-segment.r
@@ -1,6 +1,5 @@
#' Single line segments.
#'
-#' @name geom_segment
#' @param arrow specification for arrow heads, as created by arrow()
#' @seealso \code{\link{geom_path}} and \code{\link{geom_line}} for multi-
#' segment lines and paths.
@@ -30,6 +29,10 @@
#'
#' qplot(x, Freq, data = counts, geom="segment",
#' yend = 0, xend = x, size = I(10))
+geom_segment <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity", ...) {
+ GeomSegment$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomSegment <- proto(Geom, {
objname <- "segment"
View
5 R/geom-smooth.r
@@ -1,6 +1,5 @@
#' Add a smoothed conditional mean.
#'
-#' @name geom_smooth
#' @export
#' @examples
#' # See stat_smooth for examples of using built in model fitting
@@ -26,6 +25,10 @@
#'
#' qplot(wt, mpg, data=mtcars, colour=factor(cyl)) +
#' geom_smooth(aes(ymin = lcl, ymax = ucl), data=grid, stat="identity")
+geom_smooth <- function (mapping = NULL, data = NULL, stat = "smooth", position = "identity", ...) {
+ GeomSmooth$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomSmooth <- proto(Geom, {
objname <- "smooth"
View
7 R/geom-text.r
@@ -1,6 +1,5 @@
#' Textual annotations.
#'
-#' @name geom_text
#' @param parse If TRUE, the labels will be parsed into expressions and
#' displayed as described in ?plotmath
#' @export
@@ -47,6 +46,12 @@
#' p + geom_text(fontface=3)
#' p + geom_text(aes(fontface=am+1))
#' p + geom_text(aes(family=c("serif", "mono")[am+1]))
+geom_text <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity",
+parse = FALSE, ...) {
+ GeomText$new(mapping = mapping, data = data, stat = stat, position = position,
+ parse = parse, ...)
+}
+
GeomText <- proto(Geom, {
objname <- "text"
View
5 R/geom-tile.r
@@ -2,7 +2,6 @@
#'
#' Similar to \code{\link{levelplot}} and \code{\link{image}}.
#'
-#' @name geom_tile
#' @export
#' @examples
#' # Generate data
@@ -61,6 +60,10 @@
#' # scale_manual
#' col <- c("darkblue", "blue", "green", "orange", "red")
#' qplot(x, y, fill=col[z], data=example, geom="tile", width=w, group=1) + scale_fill_identity(labels=letters[1:5], breaks=col)
+geom_tile <- function (mapping = NULL, data = NULL, stat = "identity", position = "identity", ...) {
+ GeomTile$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomTile <- proto(Geom, {
objname <- "tile"
View
5 R/geom-vline.r
@@ -10,7 +10,6 @@
#' intercept for each panel using a data.frame. See the examples for the
#' differences.
#'
-#' @name geom_vline
#' @seealso
#' \code{\link{geom_hline}} for horizontal lines,
#' \code{\link{geom_abline}} for lines defined by a slope and intercept,
@@ -35,6 +34,10 @@
#' p <- qplot(mpg, wt, data=mtcars, facets = vs ~ am)
#' vline.data <- data.frame(z = c(15, 20, 25, 30), vs = c(0, 0, 1, 1), am = c(0, 1, 0, 1))
#' p + geom_vline(aes(xintercept = z), vline.data)
+geom_vline <- function (mapping = NULL, data = NULL, stat = "vline", position = "identity", ...) {
+ GeomVline$new(mapping = mapping, data = data, stat = stat, position = position, ...)
+}
+
GeomVline <- proto(Geom, {
objname <- "vline"
View
5 R/position-dodge.r
@@ -1,6 +1,5 @@
#' Adjust position by dodging overlaps to the side.
#'
-#' @name position_dodge
#' @export
#' @examples
#' ggplot(mtcars, aes(x=factor(cyl), fill=factor(vs))) +
@@ -22,6 +21,10 @@
#' position="dodge")
#' p + geom_errorbar(aes(ymin = y-1, ymax = y+1, width = 0.2),
#' position = position_dodge(width = 0.90))
+position_dodge <- function (width = NULL, height = NULL, ...) {
+ PositionDodge$new(width = width, height = height, ...)
+}
+
PositionDodge <- proto(Position, {
objname <- "dodge"
View
5 R/position-fill.r
@@ -1,7 +1,6 @@
#' Stack overlapping objects on top of one another, and standardise to have
#' equal height.
#'
-#' @name position_fill
#' @export
#' @examples
#' # See ?geom_bar and ?geom_area for more examples
@@ -14,6 +13,10 @@
#' ggplot(diamonds, aes(x=price, fill=cut)) + cde
#' ggplot(diamonds, aes(x=price, fill=clarity)) + cde
#' ggplot(diamonds, aes(x=price, fill=color)) + cde
+position_fill <- function (width = NULL, height = NULL, ...) {
+ PositionFill$new(width = width, height = height, ...)
+}
+
PositionFill <- proto(Position, {
objname <- "fill"
View
5 R/position-identity.r
@@ -1,6 +1,9 @@
#' Don't adjust position
#'
-#' @name position_identity
+position_identity <- function (width = NULL, height = NULL, ...) {
+ PositionIdentity$new(width = width, height = height, ...)
+}
+
PositionIdentity <- proto(Position, {
objname <- "identity"
View
5 R/position-jitter.r
@@ -1,6 +1,5 @@
#' Jitter points to avoid overplotting.
#'
-#' @name position_jitter
#'
#' @param width degree of jitter in x direction. Defaults to 40% of the
#' resolution of the data.
@@ -19,6 +18,10 @@
#' # The default works better for large datasets, where it will
#' # take up as much space as a boxplot or a bar
#' qplot(cut, price, data=diamonds, geom=c("boxplot", "jitter"))
+position_jitter <- function (width = NULL, height = NULL, ...) {
+ PositionJitter$new(width = width, height = height, ...)
+}
+
PositionJitter <- proto(Position, {
objname <- "jitter"
View
5 R/position-stack.r
@@ -1,6 +1,5 @@
#' Stack overlapping objects on top of one another.
#'
-#' @name position_stack
#' @export
#' @examples
#' # Stacking is the default behaviour for most area plots:
@@ -27,6 +26,10 @@
#' position = "stack")
#' # But realise that this makes it *much* harder to compare individual
#' # trends
+position_stack <- function (width = NULL, height = NULL, ...) {
+ PositionStack$new(width = width, height = height, ...)
+}
+
PositionStack <- proto(Position, {
objname <- "stack"
View
7 R/stat-bin.r
@@ -2,7 +2,6 @@
#'
#' Missing values are currently silently dropped.
#'
-#' @name stat_bin
#' @param binwidth Bin width to use. Defaults to 1/30 of the range of the
#' data
#' @param breaks Actual breaks to use. Overrides bin width and origin
@@ -38,6 +37,12 @@
#' # Also works with categorical variables
#' ggplot(movies, aes(x=mpaa)) + stat_bin()
#' qplot(mpaa, data=movies, stat="bin")
+stat_bin <- function (mapping = NULL, data = NULL, geom = "bar", position = "stack",
+width = 0.9, drop = FALSE, right = TRUE, ...) {
+ StatBin$new(mapping = mapping, data = data, geom = geom, position = position,
+ width = width, drop = drop, right = right, ...)
+}
+
StatBin <- proto(Stat, {
objname <- "bin"
informed <- FALSE
View
7 R/stat-bin2d.r
@@ -1,6 +1,5 @@
#' Count number of observation in rectangular bins.
#'
-#' @name stat_bin2d
#' @seealso \code{\link{stat_binhex}} for hexagonal binning
#' @export
#' @examples
@@ -27,6 +26,12 @@
#' xlim = c(4, 10), ylim = c(4, 10))
#' qplot(x, y, data = diamonds, geom="bin2d", binwidth = c(0.1, 0.1),
#' xlim = c(4, 10), ylim = c(4, 10))
+stat_bin2d <- function (mapping = NULL, data = NULL, geom = "rect", position = "identity",
+bins = 30, drop = TRUE, ...) {
+ StatBin2d$new(mapping = mapping, data = data, geom = geom, position = position,
+ bins = bins, drop = drop, ...)
+}
+
StatBin2d <- proto(Stat, {
objname <- "bin2d"
View
7 R/stat-binhex.r
@@ -1,6 +1,5 @@
#' Bin 2d plane into hexagons.
#'
-#' @name stat_binhex
#' @seealso \code{\link{stat_bin2d}} for rectangular binning
#' @export
#' @examples
@@ -21,6 +20,12 @@
#' qplot(x, y, data = diamonds, geom="hex", xlim = c(4, 10), ylim = c(4, 10))
#' qplot(x, y, data = diamonds, geom="hex", xlim = c(4, 10), ylim = c(4, 10),
#' binwidth = c(0.1, 0.1))
+stat_binhex <- function (mapping = NULL, data = NULL, geom = "hex", position = "identity",
+bins = 30, na.rm = FALSE, ...) {
+ StatBinhex$new(mapping = mapping, data = data, geom = geom, position = position,
+ bins = bins, na.rm = na.rm, ...)
+}
+
StatBinhex <- proto(Stat, {
objname <- "binhex"
View
7 R/stat-boxplot.r
@@ -1,6 +1,5 @@
#' Calculate components of box and whisker plot.
#'
-#' @name stat_boxplot
#' @return A data frame with additional columns:
#' \item{width}{width of boxplot}
#' \item{ymin}{lower whisker = lower hinge - 1.5 * IQR}
@@ -11,6 +10,12 @@
#' @export
#' @examples
#' # See geom_boxplot for examples
+stat_boxplot <- function (mapping = NULL, data = NULL, geom = "boxplot", position = "dodge",
+na.rm = FALSE, coef = 1.5, ...) {
+ StatBoxplot$new(mapping = mapping, data = data, geom = geom,
+ position = position, na.rm = na.rm, coef = coef, ...)
+}
+
StatBoxplot <- proto(Stat, {
objname <- "boxplot"
View
7 R/stat-contour.r
@@ -1,6 +1,5 @@
#' Calculate contours of 3d data.
#'
-#' @name stat_contour
#' @return A data frame with additional column:
#' \item{level}{height of contour}
#' @export
@@ -44,6 +43,12 @@
#' # Use qplot instead
#' qplot(x, y, z = z, data = volcano3d, geom = "contour")
#' qplot(x, y, z = z, data = volcano3d, stat = "contour", geom = "path")
+stat_contour <- function (mapping = NULL, data = NULL, geom = "path", position = "identity",
+na.rm = FALSE, ...) {
+ StatContour$new(mapping = mapping, data = data, geom = geom,
+ position = position, na.rm = na.rm, ...)
+}
+
StatContour <- proto(Stat, {
objname <- "contour"
View
7 R/stat-density-2d.r
@@ -1,6 +1,5 @@
#' 2d density estimation.
#'
-#' @name stat_density2d
#' @param contour If \code{TRUE}, contour the results of the 2d density
#' estimation
#' @param n number of grid points in each direction
@@ -43,6 +42,12 @@
#'
#' # Or points:
#' d + stat_density2d(geom="point", aes(size = ..density..), contour = FALSE)
+stat_density2d <- function (mapping = NULL, data = NULL, geom = "density2d", position = "identity",
+na.rm = FALSE, contour = TRUE, n = 100, ...) {
+ StatDensity2d$new(mapping = mapping, data = data, geom = geom,
+ position = position, na.rm = na.rm, contour = contour, n = n, ...)
+}
+
StatDensity2d <- proto(Stat, {
objname <- "density2d"
View
7 R/stat-density.r
@@ -1,6 +1,5 @@
#' 1d kernel density estimate.
#'
-#' @name stat_density
#' @param adjust see \code{\link{density}} for details
#' @param kernel kernel used for density estimation, see
#' \code{\link{density}} for details
@@ -75,6 +74,12 @@
#' # Use qplot instead
#' qplot(length, data=movies, geom="density", weight=rating)
#' qplot(length, data=movies, geom="density", weight=rating/sum(rating))
+stat_density <- function (mapping = NULL, data = NULL, geom = "area", position = "stack",
+adjust = 1, kernel = "gaussian", trim = FALSE, na.rm = FALSE, ...) {
+ StatDensity$new(mapping = mapping, data = data, geom = geom, position = position,
+ adjust = adjust, kernel = kernel, trim = trim, na.rm = na.rm, ...)
+}
+
StatDensity <- proto(Stat, {
objname <- "density"
View
7 R/stat-function.r
@@ -1,6 +1,5 @@
#' Superimpose a function.
#'
-#' @name stat_function
#' @param fun function to use
#' @param n number of points to interpolate along
#' @param args list of additional arguments to pass to \code{fun}
@@ -13,6 +12,12 @@
#' base <- qplot(x, geom="density")
#' base + stat_function(fun = dnorm, colour = "red")
#' base + stat_function(fun = dnorm, colour = "red", arg = list(mean = 3))
+stat_function <- function (mapping = NULL, data = NULL, geom = "path", position = "identity",
+fun, n = 101, args = list(), ...) {
+ StatFunction$new(mapping = mapping, data = data, geom = geom,
+ position = position, fun = fun, n = n, args = args, ...)
+}
+
StatFunction <- proto(Stat, {
objname <- "function"
View
6 R/stat-identity.r
@@ -1,9 +1,13 @@
#' Identity statistic.
#'
-#' @name stat_identity
#' @export
#' @examples
#' # Doesn't do anything, so hard to come up a useful example
+stat_identity <- function (mapping = NULL, data = NULL, geom = "point", position = "identity", ...) {
+ StatIdentity$new(mapping = mapping, data = data, geom = geom,
+ position = position, ...)
+}
+
StatIdentity <- proto(Stat, {
objname <- "identity"
View
8 R/stat-qq.r
@@ -1,6 +1,4 @@
#' Calculation for quantile-quantile plot.
-#'
-#' @name stat_qq
#'
#' @param quantiles Quantiles to compute and display
#' @param dist Distribution function to use, if x not specified
@@ -32,6 +30,12 @@
#' # Using to explore the distribution of a variable
#' qplot(sample = mpg, data = mtcars)
#' qplot(sample = mpg, data = mtcars, colour = factor(cyl))
+stat_qq <- function (mapping = NULL, data = NULL, geom = "point", position = "identity",
+distribution = qnorm, dparams = list(), na.rm = FALSE, ...) {
+ StatQq$new(mapping = mapping, data = data, geom = geom, position = position,
+ distribution = distribution, dparams = dparams, na.rm = na.rm, ...)
+}
+
StatQq <- proto(Stat, {
objname <- "qq"
View
9 R/stat-quantile.r
@@ -1,6 +1,5 @@
#' Continuous quantiles.
#'
-#' @name stat_quantile
#' @param quantiles conditional quantiles of y to calculate and display
#' @param formula formula relating y variables to x variables
#' @param xseq exact points to evaluate smooth at, overrides n
@@ -30,6 +29,14 @@
#'
#' # Use qplot instead
#' qplot(year, rating, data=movies, geom="quantile")
+stat_quantile <- function (mapping = NULL, data = NULL, geom = "quantile", position = "identity",
+quantiles = c(0.25, 0.5, 0.75), formula = y ~ x, method = "rq",
+na.rm = FALSE, ...) {
+ StatQuantile$new(mapping = mapping, data = data, geom = geom,
+ position = position, quantiles = quantiles, formula = formula,
+ method = method, na.rm = na.rm, ...)
+}
+
StatQuantile <- proto(Stat, {
objname <- "quantile"
View
9 R/stat-smooth.r
@@ -2,7 +2,6 @@
#'
#' Aids the eye in seeing patterns in the presence of overplotting.
#'
-#' @name stat_smooth
#' @param method smoothing method (function) to use, eg. lm, glm, gam, loess,
#' rlm
#' @param formula formula to use in smoothing function, eg. \code{y ~ x},
@@ -79,6 +78,14 @@
#' stat_smooth(method="glm", family="binomial")
#' qplot(Age, as.numeric(Kyphosis) - 1, data=kyphosis) +
#' stat_smooth(method="glm", family="binomial", formula = y ~ ns(x, 2))
+stat_smooth <- function (mapping = NULL, data = NULL, geom = "smooth", position = "identity",
+method = "auto", formula = y ~ x, se = TRUE, n = 80, fullrange = FALSE,
+level = 0.95, na.rm = FALSE, ...) {
+ StatSmooth$new(mapping = mapping, data = data, geom = geom, position = position,
+ method = method, formula = formula, se = se, n = n, fullrange = fullrange,
+ level = level, na.rm = na.rm, ...)
+}
+
StatSmooth <- proto(Stat, {
objname <- "smooth"
View
5 R/stat-spoke.r
@@ -1,6 +1,5 @@
#' Convert angle and radius to xend and yend.
#'
-#' @name stat_spoke
#' @return a data.frame with additional columns
#' \item{xend}{x position of end of line segment}
#' \item{yend}{x position of end of line segment}
@@ -14,6 +13,10 @@
#' last_plot() + scale_y_reverse()
#'
#' qplot(x, y, data=df) + stat_spoke(aes(angle=angle, radius=speed))
+stat_spoke <- function (mapping = NULL, data = NULL, geom = "segment", position = "identity", ...) {
+ StatSpoke$new(mapping = mapping, data = data, geom = geom, position = position, ...)
+}
+
StatSpoke <- proto(Stat, {
objname <- "spoke"
View
5 R/stat-sum.r
@@ -1,6 +1,5 @@
#' Sum unique values. Useful for overplotting on scatterplots.
#'
-#' @name stat_sum
#' @seealso \code{\link{ggfluctuation}} for a fluctuation diagram,
#' @return a data.frame with additional columns
#' \item{n}{number of observations at position}
@@ -30,6 +29,10 @@
#' # Or using qplot
#' qplot(cut, clarity, data = diamonds)
#' qplot(cut, clarity, data = diamonds, stat = "sum", group = 1)
+stat_sum <- function (mapping = NULL, data = NULL, geom = "point", position = "identity", ...) {
+ StatSum$new(mapping = mapping, data = data, geom = geom, position = position, ...)
+}
+
StatSum <- proto(Stat, {
objname <- "sum"
View
5 R/stat-summary.r
@@ -10,7 +10,6 @@
#' on a data.frame it should return a data frame with variables that the geom
#' can use.
#'
-#' @name stat_summary
#' @seealso \code{\link{geom_errorbar}}, \code{\link{geom_pointrange}},
#' \code{\link{geom_linerange}}, \code{\link{geom_crossbar}} for geoms to
#' display summarised data
@@ -92,6 +91,10 @@
#' # and stretching the geoms onto the log scale. Compare the widths of the
#' # standard errors.
#' m2 + coord_trans(y="log10")
+stat_summary <- function (mapping = NULL, data = NULL, geom = "pointrange", position = "identity", ...) {
+ StatSummary$new(mapping = mapping, data = data, geom = geom, position = position, ...)
+}
+
StatSummary <- proto(Stat, {
objname <- "summary"
View
5 R/stat-unique.r
@@ -1,10 +1,13 @@
#' Remove duplicates.
#'
-#' @name stat_unique
#' @export
#' @examples
#' ggplot(mtcars, aes(vs, am)) + geom_point(alpha = 0.1)
#' ggplot(mtcars, aes(vs, am)) + geom_point(alpha = 0.1, stat="unique")
+stat_unique <- function (mapping = NULL, data = NULL, geom = "point", position = "identity", ...) {
+ StatUnique$new(mapping = mapping, data = data, geom = geom, position = position, ...)
+}
+
StatUnique <- proto(Stat, {
objname <- "unique"
desc <- "Remove duplicates"
View
19 R/stat-vline.r
@@ -1,10 +1,13 @@
#' Add a line with slope and intercept.
#'
#' @keywords internal
-#' @name stat_abline
#' @export
#' @examples
#' # see geom_abline
+stat_abline <- function (mapping = NULL, data = NULL, geom = "abline", position = "identity", ...) {
+ StatAbline$new(mapping = mapping, data = data, geom = geom, position = position, ...)
+}
+
StatAbline <- proto(Stat, {
objname <- "abline"
@@ -32,10 +35,15 @@ StatAbline <- proto(Stat, {
#' Add a vertical line
#'
#' @keywords internal
-#' @name stat_vline
#' @export
#' @examples
#' # see geom_vline
+stat_vline <- function (mapping = NULL, data = NULL, geom = "vline", position = "identity",
+intercept, ...) {
+ StatVline$new(mapping = mapping, data = data, geom = geom, position = position,
+ intercept = intercept, ...)
+}
+
StatVline <- proto(Stat, {
objname <- "vline"
@@ -60,10 +68,15 @@ StatVline <- proto(Stat, {
#' Add a horizontal line
#'
#' @keywords internal
-#' @name stat_hline
#' @export
#' @examples
#' # see geom_hline
+stat_hline <- function (mapping = NULL, data = NULL, geom = "hline", position = "identity",
+intercept, ...) {
+ StatHline$new(mapping = mapping, data = data, geom = geom, position = position,
+ intercept = intercept, ...)
+}
+
StatHline <- proto(Stat, {
calculate <- function(., data, scales, yintercept = NULL, intercept, ...) {
if (!missing(intercept)) {
View
57 R/xxx.r
@@ -1,57 +0,0 @@
-geom_abline <- GeomAbline$build_accessor()
-geom_area <- GeomArea$build_accessor()
-geom_bar <- GeomBar$build_accessor()
-geom_bin2d <- GeomBin2d$build_accessor()
-geom_blank <- GeomBlank$build_accessor()
-geom_boxplot <- GeomBoxplot$build_accessor()
-geom_contour <- GeomContour$build_accessor()
-geom_crossbar <- GeomCrossbar$build_accessor()
-geom_density <- GeomDensity$build_accessor()
-geom_density2d <- GeomDensity2d$build_accessor()
-geom_errorbar <- GeomErrorbar$build_accessor()
-geom_errorbarh <- GeomErrorbarh$build_accessor()
-geom_freqpoly <- GeomFreqpoly$build_accessor()
-geom_hex <- GeomHex$build_accessor()
-geom_histogram <- GeomHistogram$build_accessor()
-geom_hline <- GeomHline$build_accessor()
-geom_jitter <- GeomJitter$build_accessor()
-geom_line <- GeomLine$build_accessor()
-geom_linerange <- GeomLinerange$build_accessor()
-geom_path <- GeomPath$build_accessor()
-geom_point <- GeomPoint$build_accessor()
-geom_pointrange <- GeomPointrange$build_accessor()
-geom_polygon <- GeomPolygon$build_accessor()
-geom_quantile <- GeomQuantile$build_accessor()
-geom_rect <- GeomRect$build_accessor()
-geom_ribbon <- GeomRibbon$build_accessor()
-geom_rug <- GeomRug$build_accessor()
-geom_segment <- GeomSegment$build_accessor()
-geom_smooth <- GeomSmooth$build_accessor()
-geom_step <- GeomStep$build_accessor()
-geom_text <- GeomText$build_accessor()
-geom_tile <- GeomTile$build_accessor()
-geom_vline <- GeomVline$build_accessor()
-position_dodge <- PositionDodge$build_accessor()
-position_fill <- PositionFill$build_accessor()
-position_identity <- PositionIdentity$build_accessor()
-position_jitter <- PositionJitter$build_accessor()
-position_stack <- PositionStack$build_accessor()
-stat_abline <- StatAbline$build_accessor()
-stat_bin <- StatBin$build_accessor()
-stat_bin2d <- StatBin2d$build_accessor()
-stat_binhex <- StatBinhex$build_accessor()
-stat_boxplot <- StatBoxplot$build_accessor()
-stat_contour <- StatContour$build_accessor()
-stat_density <- StatDensity$build_accessor()
-stat_density2d <- StatDensity2d$build_accessor()
-stat_function <- StatFunction$build_accessor()
-stat_hline <- StatHline$build_accessor()
-stat_identity <- StatIdentity$build_accessor()
-stat_qq <- StatQq$build_accessor()
-stat_quantile <- StatQuantile$build_accessor()
-stat_smooth <- StatSmooth$build_accessor()
-stat_spoke <- StatSpoke$build_accessor()
-stat_sum <- StatSum$build_accessor()
-stat_summary <- StatSummary$build_accessor()
-stat_unique <- StatUnique$build_accessor()
-stat_vline <- StatVline$build_accessor()
View
2  man/geom_abline.Rd
@@ -1,6 +1,8 @@
\name{geom_abline}
\alias{geom_abline}
\title{Line specified by slope and intercept.}
+\usage{geom_abline(mapping, data, stat="abline",
+ position="identity", ...)}
\description{
Line specified by slope and intercept.
View
2  man/geom_area.Rd
@@ -1,6 +1,8 @@
\name{geom_area}
\alias{geom_area}
\title{Area plot.}
+\usage{geom_area(mapping, data, stat="identity", position="stack",
+ na.rm=FALSE, ...)}
\description{
Area plot.
View
1  man/geom_bar.Rd
@@ -1,6 +1,7 @@
\name{geom_bar}
\alias{geom_bar}
\title{Bars, rectangles with bases on x-axis...}
+\usage{geom_bar(mapping, data, stat="bin", position="stack", ...)}
\description{
Bars, rectangles with bases on x-axis
View
2  man/geom_bin2d.Rd
@@ -1,6 +1,8 @@
\name{geom_bin2d}
\alias{geom_bin2d}
\title{Add heatmap of 2d bin counts.}
+\usage{geom_bin2d(mapping, data, stat="bin2d",
+ position="identity", ...)}
\description{
Add heatmap of 2d bin counts.
View
2  man/geom_blank.Rd
@@ -1,6 +1,8 @@
\name{geom_blank}
\alias{geom_blank}
\title{Blank, draws nothing.}
+\usage{geom_blank(mapping, data, stat="identity",
+ position="identity", ...)}
\description{
Blank, draws nothing.
View
3  man/geom_boxplot.Rd
@@ -1,6 +1,9 @@
\name{geom_boxplot}
\alias{geom_boxplot}
\title{Box and whiskers plot.}
+\usage{geom_boxplot(mapping, data, stat="boxplot",
+ position="dodge", outlier.colour="black",
+ outlier.shape=16, outlier.size=2, ...)}
\description{
Box and whiskers plot.
View
3  man/geom_contour.Rd
@@ -1,6 +1,9 @@
\name{geom_contour}
\alias{geom_contour}
\title{Display contours of a 3d surface in 2d.}
+\usage{geom_contour(mapping, data, stat="contour",
+ position="identity", lineend="butt", linejoin="round",
+ linemitre=1, na.rm=FALSE, ...)}
\description{
Display contours of a 3d surface in 2d.
View
2  man/geom_crossbar.Rd
@@ -1,6 +1,8 @@
\name{geom_crossbar}
\alias{geom_crossbar}
\title{Hollow bar with middle indicated by horizontal line.}
+\usage{geom_crossbar(mapping, data, stat="identity",
+ position="identity", fatten=2, ...)}
\description{
Hollow bar with middle indicated by horizontal line.
View
2  man/geom_density.Rd
@@ -1,6 +1,8 @@
\name{geom_density}
\alias{geom_density}
\title{Display a smooth density estimate.}
+\usage{geom_density(mapping, data, stat="density",
+ position="identity", na.rm=FALSE, ...)}
\description{
Display a smooth density estimate.
View
3  man/geom_density2d.Rd
@@ -1,6 +1,9 @@
\name{geom_density2d}
\alias{geom_density2d}
\title{Contours from a 2d density estimate.}
+\usage{geom_density2d(mapping, data, stat="density2d",
+ position="identity", lineend="butt", linejoin="round",
+ linemitre=1, na.rm=FALSE, ...)}
\description{
Contours from a 2d density estimate.
View
2  man/geom_errorbar.Rd
@@ -1,6 +1,8 @@
\name{geom_errorbar}
\alias{geom_errorbar}
\title{Error bars.}
+\usage{geom_errorbar(mapping, data, stat="identity",
+ position="identity", ...)}
\description{
Error bars.
View
2  man/geom_errorbarh.Rd
@@ -1,6 +1,8 @@
\name{geom_errorbarh}
\alias{geom_errorbarh}
\title{Horizontal error bars...}
+\usage{geom_errorbarh(mapping, data, stat="identity",
+ position="identity", ...)}
\description{
Horizontal error bars
View
14 man/geom_freqpoly.Rd
@@ -1,17 +1,19 @@
\name{geom_freqpoly}
\alias{geom_freqpoly}
\title{Frequency polygon.}
+\usage{geom_freqpoly(mapping, data, stat="bin",
+ position="identity", ...)}
\description{
Frequency polygon.
}
\seealso{\code{\link{geom_histogram}}: histograms}
-\examples{qplot(carat, data = diamonds, geom="freqpoly")
-qplot(carat, data = diamonds, geom="freqpoly", binwidth = 0.1)
-qplot(carat, data = diamonds, geom="freqpoly", binwidth = 0.01)
+\examples{qplot(carat, data = diamonds, geom = "freqpoly")
+qplot(carat, data = diamonds, geom = "freqpoly", binwidth = 0.1)
+qplot(carat, data = diamonds, geom = "freqpoly", binwidth = 0.01)
-qplot(price, data = diamonds, geom="freqpoly", binwidth = 1000)
-qplot(price, data = diamonds, geom="freqpoly", binwidth = 1000,
+qplot(price, data = diamonds, geom = "freqpoly", binwidth = 1000)
+qplot(price, data = diamonds, geom = "freqpoly", binwidth = 1000,
colour = color)
-qplot(price, ..density.., data = diamonds, geom="freqpoly",
+qplot(price, ..density.., data = diamonds, geom = "freqpoly",
binwidth = 1000, colour = color)}
View
2  man/geom_hex.Rd
@@ -1,6 +1,8 @@
\name{geom_hex}
\alias{geom_hex}
\title{Hexagon bining.}
+\usage{geom_hex(mapping, data, stat="binhex", position="identity",
+ ...)}
\description{
Hexagon bining.
View
2  man/geom_histogram.Rd
@@ -1,6 +1,8 @@
\name{geom_histogram}
\alias{geom_histogram}
\title{Histogram...}
+\usage{geom_histogram(mapping, data, stat="bin", position="stack",
+ ...)}
\description{
Histogram
View
2  man/geom_hline.Rd
@@ -1,6 +1,8 @@
\name{geom_hline}
\alias{geom_hline}
\title{Horizontal line.}
+\usage{geom_hline(mapping, data, stat="hline",
+ position="identity", ...)}
\description{
Horizontal line.
View
2  man/geom_jitter.Rd
@@ -1,6 +1,8 @@
\name{geom_jitter}
\alias{geom_jitter}
\title{Points, jittered to reduce overplotting.}
+\usage{geom_jitter(mapping, data, stat="identity",
+ position="jitter", na.rm=FALSE, ...)}
\description{
Points, jittered to reduce overplotting.
View
2  man/geom_line.Rd
@@ -1,6 +1,8 @@
\name{geom_line}
\alias{geom_line}
\title{Connect observations, ordered by x value.}
+\usage{geom_line(mapping, data, stat="identity",
+ position="identity", ...)}
\description{
Connect observations, ordered by x value.
View
2  man/geom_linerange.Rd
@@ -1,6 +1,8 @@
\name{geom_linerange}
\alias{geom_linerange}
\title{An interval represented by a vertical line.}
+\usage{geom_linerange(mapping, data, stat="identity",
+ position="identity", ...)}
\description{
An interval represented by a vertical line.
View
3  man/geom_path.Rd
@@ -1,6 +1,9 @@
\name{geom_path}
\alias{geom_path}
\title{Connect observations in original order...}
+\usage{geom_path(mapping, data, stat="identity",
+ position="identity", lineend="butt", linejoin="round",
+ linemitre=1, na.rm=FALSE, ...)}
\description{
Connect observations in original order
View
2  man/geom_pointrange.Rd
@@ -1,6 +1,8 @@
\name{geom_pointrange}
\alias{geom_pointrange}
\title{An interval represented by a vertical line, with a point in the middle.}
+\usage{geom_pointrange(mapping, data, stat="identity",
+ position="identity", ...)}
\description{
An interval represented by a vertical line, with a point
View
2  man/geom_polygon.Rd
@@ -1,6 +1,8 @@
\name{geom_polygon}
\alias{geom_polygon}
\title{Polygon, a filled path.}
+\usage{geom_polygon(mapping, data, stat="identity",
+ position="identity", ...)}
\description{
Polygon, a filled path.
View
3  man/geom_quantile.Rd
@@ -1,6 +1,9 @@
\name{geom_quantile}
\alias{geom_quantile}
\title{Add quantile lines from a quantile regression.}
+\usage{geom_quantile(mapping, data, stat="quantile",
+ position="identity", lineend="butt", linejoin="round",
+ linemitre=1, na.rm=FALSE, ...)}
\description{
Add quantile lines from a quantile regression.
View
2  man/geom_rect.Rd
@@ -1,6 +1,8 @@
\name{geom_rect}
\alias{geom_rect}
\title{2d rectangles.}
+\usage{geom_rect(mapping, data, stat="identity",
+ position="identity", ...)}
\description{
2d rectangles.
View
2  man/geom_ribbon.Rd
@@ -1,6 +1,8 @@
\name{geom_ribbon}
\alias{geom_ribbon}
\title{Ribbons, y range with continuous x values.}
+\usage{geom_ribbon(mapping, data, stat="identity",
+ position="identity", na.rm=FALSE, ...)}
\description{
Ribbons, y range with continuous x values.
View
2  man/geom_rug.Rd
@@ -1,6 +1,8 @@
\name{geom_rug}
\alias{geom_rug}
\title{Marginal rug plots.}
+\usage{geom_rug(mapping, data, stat="identity",
+ position="identity", ...)}
\description{
Marginal rug plots.
View
2  man/geom_segment.Rd
@@ -1,6 +1,8 @@
\name{geom_segment}
\alias{geom_segment}
\title{Single line segments.}
+\usage{geom_segment(mapping, data, stat="identity",
+ position="identity", ...)}
\description{
Single line segments.
View
2  man/geom_smooth.Rd
@@ -1,6 +1,8 @@
\name{geom_smooth}
\alias{geom_smooth}
\title{Add a smoothed conditional mean.}
+\usage{geom_smooth(mapping, data, stat="smooth",
+ position="identity", ...)}
\description{
Add a smoothed conditional mean.
View
2  man/geom_step.Rd
@@ -1,6 +1,8 @@
\name{geom_step}
\alias{geom_step}
\title{Connect observations by stairs.}
+\usage{geom_step(mapping, data, stat="identity",
+ position="identity", direction="hv", ...)}
\description{
Connect observations by stairs.
View
2  man/geom_text.Rd
@@ -1,6 +1,8 @@
\name{geom_text}
\alias{geom_text}
\title{Textual annotations.}
+\usage{geom_text(mapping, data, stat="identity",
+ position="identity", parse=FALSE, ...)}
\description{
Textual annotations.
View
2  man/geom_tile.Rd
@@ -1,6 +1,8 @@
\name{geom_tile}
\alias{geom_tile}
\title{Tile plane with rectangles.}
+\usage{geom_tile(mapping, data, stat="identity",
+ position="identity", ...)}
\description{
Tile plane with rectangles.
View
2  man/geom_vline.Rd
@@ -1,6 +1,8 @@
\name{geom_vline}
\alias{geom_vline}
\title{Line, vertical.}
+\usage{geom_vline(mapping, data, stat="vline",
+ position="identity", ...)}
\description{
Line, vertical.
View
1  man/position_dodge.Rd
@@ -1,6 +1,7 @@
\name{position_dodge}
\alias{position_dodge}
\title{Adjust position by dodging overlaps to the side.}
+\usage{position_dodge(width, height, ...)}
\description{
Adjust position by dodging overlaps to the side.
View
1  man/position_fill.Rd
@@ -1,6 +1,7 @@
\name{position_fill}
\alias{position_fill}
\title{Stack overlapping objects on top of one another, and standardise to have...}
+\usage{position_fill(width, height, ...)}
\description{
Stack overlapping objects on top of one another, and
View
1  man/position_identity.Rd
@@ -1,6 +1,7 @@
\name{position_identity}
\alias{position_identity}
\title{Don't adjust position...}
+\usage{position_identity(width, height, ...)}
\description{
Don't adjust position
View
1  man/position_jitter.Rd
@@ -1,6 +1,7 @@
\name{position_jitter}
\alias{position_jitter}
\title{Jitter points to avoid overplotting.}
+\usage{position_jitter(width, height, ...)}
\description{
Jitter points to avoid overplotting.
View
1  man/position_stack.Rd
@@ -1,6 +1,7 @@
\name{position_stack}
\alias{position_stack}
\title{Stack overlapping objects on top of one another.}
+\usage{position_stack(width, height, ...)}
\description{
Stack overlapping objects on top of one another.
View
2  man/stat_abline.Rd
@@ -1,6 +1,8 @@
\name{stat_abline}
\alias{stat_abline}
\title{Add a line with slope and intercept.}
+\usage{stat_abline(mapping, data, geom="abline",
+ position="identity", ...)}
\description{
Add a line with slope and intercept.
View
2  man/stat_bin.Rd
@@ -1,6 +1,8 @@
\name{stat_bin}
\alias{stat_bin}
\title{Bin data.}
+\usage{stat_bin(mapping, data, geom="bar", position="stack",
+ width=0.9, drop=FALSE, right=TRUE, ...)}
\description{
Bin data.
View
2  man/stat_bin2d.Rd
@@ -1,6 +1,8 @@
\name{stat_bin2d}
\alias{stat_bin2d}
\title{Count number of observation in rectangular bins.}
+\usage{stat_bin2d(mapping, data, geom="rect", position="identity",
+ bins=30, drop=TRUE, ...)}
\description{
Count number of observation in rectangular bins.
View
2  man/stat_binhex.Rd
@@ -1,6 +1,8 @@
\name{stat_binhex}
\alias{stat_binhex}
\title{Bin 2d plane into hexagons.}
+\usage{stat_binhex(mapping, data, geom="hex", position="identity",
+ bins=30, na.rm=FALSE, ...)}
\description{
Bin 2d plane into hexagons.
View
2  man/stat_boxplot.Rd
@@ -1,6 +1,8 @@
\name{stat_boxplot}
\alias{stat_boxplot}
\title{Calculate components of box and whisker plot.}
+\usage{stat_boxplot(mapping, data, geom="boxplot",
+ position="dodge", na.rm=FALSE, coef=1.5, ...)}
\description{
Calculate components of box and whisker plot.
View
2  man/stat_contour.Rd
@@ -1,6 +1,8 @@
\name{stat_contour}
\alias{stat_contour}
\title{Calculate contours of 3d data.}
+\usage{stat_contour(mapping, data, geom="path",
+ position="identity", na.rm=FALSE, ...)}
\description{
Calculate contours of 3d data.
View
3  man/stat_density.Rd
@@ -1,6 +1,9 @@
\name{stat_density}
\alias{stat_density}
\title{1d kernel density estimate.}
+\usage{stat_density(mapping, data, geom="area", position="stack",
+ adjust=1, kernel="gaussian", trim=FALSE, na.rm=FALSE,
+ ...)}