Skip to content

Commit 576973b

Browse files
committed
Doc tweaks for fortify + autoplot
1 parent 887ee9e commit 576973b

File tree

10 files changed

+31
-16
lines changed

10 files changed

+31
-16
lines changed

R/fortify-lm.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#' @param model linear model
1515
#' @param data data set, defaults to data used to fit model
1616
#' @param ... not used by this method
17+
#' @keywords internal
1718
#' @export
1819
#' @examples
1920
#' mod <- lm(mpg ~ wt, data = mtcars)

R/fortify-map.r

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#' Fortify method for map objects.
1+
#' Fortify method for map objects
22
#'
33
#' This function turns a map into a data frame that can more easily be
44
#' plotted with ggplot2.
@@ -8,6 +8,7 @@
88
#' @param model map object
99
#' @param data not used by this method
1010
#' @param ... not used by this method
11+
#' @keywords internal
1112
#' @examples
1213
#' if (require("maps")) {
1314
#' ca <- map("county", "ca", plot = FALSE, fill = TRUE)
@@ -32,7 +33,10 @@ fortify.map <- function(model, data, ...) {
3233
df[stats::complete.cases(df$lat, df$long), ]
3334
}
3435

35-
#' Create a data frame of map data.
36+
#' Create a data frame of map data
37+
#'
38+
#' Easily turn data from the \pkg{maps} package in to a data frame suitable
39+
#' for plotting with ggplot2.
3640
#'
3741
#' @param map name of map provided by the \pkg{maps} package. These
3842
#' include \code{\link[maps]{county}}, \code{\link[maps]{france}},
@@ -45,6 +49,7 @@ fortify.map <- function(model, data, ...) {
4549
#' @param exact should the \code{region} be treated as a regular expression
4650
#' (\code{FALSE}) or as a fixed string (\code{TRUE}).
4751
#' @param ... all other arguments passed on to \code{\link[maps]{map}}
52+
#' @keywords internal
4853
#' @export
4954
#' @examples
5055
#' if (require("maps")) {

R/fortify-multcomp.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#' \code{summary.glht} or \code{\link[multcomp]{cld}}
55
#' @param data,... other arguments to the generic ignored in this method.
66
#' @name fortify-multcomp
7+
#' @keywords internal
78
#' @examples
89
#' if (require("multcomp")) {
910
#' amod <- aov(breaks ~ wool + tension, data = warpbreaks)

R/fortify-spatial.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#' @param data not used by this method
88
#' @param region name of variable used to split up regions
99
#' @param ... not used by this method
10+
#' @keywords internal
1011
#' @name fortify.sp
1112
#' @examples
1213
#' if (require("maptools")) {

_pkgdown.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ reference:
146146
- aes_
147147
- print.ggplot
148148

149-
- title: Extending ggplot2 with ggproto
149+
- title: Extending ggplot2
150150
desc: >
151151
To create your own geoms, stats, scales, and facets, you'll need to learn
152152
a bit about the object oriented system that ggplot2 uses. Start by
@@ -156,16 +156,6 @@ reference:
156156
- ggproto
157157
- print.ggproto
158158

159-
- title: Autoplot and fortify
160-
contents:
161-
- autoplot
162-
- fortify-multcomp
163-
- fortify.lm
164-
- fortify.map
165-
- fortify
166-
- fortify.sp
167-
- map_data
168-
169159
- title: Vector helpers
170160
contents:
171161
- cut_interval
@@ -200,3 +190,14 @@ reference:
200190
- txhousing
201191
- luv_colours
202192

193+
- title: Autoplot and fortify
194+
desc: >
195+
`autoplot()` is an extension mechansim for ggplot2 it provides a way
196+
for package authors to add methods that work like the base `plot()`
197+
function, generating useful default plots with little user interaction.
198+
`fortify()` turns objects into tidy data frames: it has largely been
199+
superceded by the [broom package](https://github.com/dgrtwo/broom).
200+
contents:
201+
- autoplot
202+
- fortify
203+
- map_data

man/fortify-multcomp.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/fortify.lm.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/fortify.map.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/fortify.sp.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/map_data.Rd

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)