Skip to content

Commit fc62903

Browse files
authored
Crosslink documentation with book (#5678)
* crosslink docs with book * Add helper function * Use helper function
1 parent 01018d3 commit fc62903

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+242
-22
lines changed

R/annotation.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#' you must specify at least one of these.
2121
#' @inheritParams layer
2222
#' @inheritParams geom_point
23+
#' @seealso
24+
#' The `r link_book("custom annotations section", "annotations#sec-custom-annotations")`
2325
#' @export
2426
#' @examples
2527
#' p <- ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point()

R/coord-.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
#' system to manipulate the `layout` data frame which assigns
4545
#' data to panels and scales.
4646
#'
47+
#' See also the `r link_book("new coords section", "extensions#sec-new-coords")`
48+
#'
4749
#' @rdname ggplot2-ggproto
4850
#' @format NULL
4951
#' @usage NULL

R/coord-map.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
#' setting of `"on"` (the default) means yes, and a setting of `"off"`
4646
#' means no. For details, please see [`coord_cartesian()`].
4747
#' @export
48+
#' @seealso
49+
#' The `r link_book("polygon maps section", "maps#sec-polygonmaps")`
4850
#' @examples
4951
#' if (require("maps")) {
5052
#' nz <- map_data("nz")

R/coord-polar.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#' setting of `"on"` (the default) means yes, and a setting of `"off"`
1313
#' means no. For details, please see [`coord_cartesian()`].
1414
#' @export
15+
#' @seealso
16+
#' The `r link_book("polar coordinates section", "coord#polar-coordinates-with-coord_polar")`
1517
#' @examples
1618
#' # NOTE: Use these plots with caution - polar coordinates has
1719
#' # major perceptual problems. The main point of these examples is

R/coord-transform.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#' @inheritParams coord_cartesian
1212
#' @param x,y Transformers for x and y axes or their names.
1313
#' @param limx,limy `r lifecycle::badge("deprecated")` use `xlim` and `ylim` instead.
14+
#' @seealso
15+
#' The `r link_book("coord transformations section", "coord#transformations-with-coord_trans")`
1416
#' @export
1517
#' @examples
1618
#' \donttest{

R/facet-.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ NULL
7474
#' parameter which is used to determine if scales are retrained after Stat
7575
#' transformations has been applied.
7676
#'
77+
#' See also the `r link_book("new facets section", "extensions#new-facets")`
78+
#'
7779
#' @rdname ggplot2-ggproto
7880
#' @format NULL
7981
#' @usage NULL

R/facet-grid-.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ NULL
7070
#' draws the labels at the interior axes in the x- or y-direction
7171
#' respectively.
7272
#' @export
73+
#' @seealso
74+
#' The `r link_book("facet grid section", "facet#facet-grid")`
7375
#' @examples
7476
#' p <- ggplot(mpg, aes(displ, cty)) + geom_point()
7577
#'

R/facet-wrap.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ NULL
3535
#' `"all_x"` or `"all_y"`, only draws the labels at the interior axes in the
3636
#' x- or y-direction respectively.
3737
#' @inheritParams facet_grid
38+
#' @seealso
39+
#' The `r link_book("facet wrap section", "facet#sec-facet-wrap")`
3840
#' @export
3941
#' @examples
4042
#' p <- ggplot(mpg, aes(displ, hwy)) + geom_point()

R/geom-.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ NULL
5050
#' default values for aesthetics.
5151
#' - `setup_data`: Converts width and height to xmin and xmax,
5252
#' and ymin and ymax values. It can potentially set other values as well.
53+
#'
54+
#' See also the `r link_book("new geoms section", "extensions#sec-new-geoms")`
5355
#' @rdname ggplot2-ggproto
5456
#' @format NULL
5557
#' @usage NULL

R/geom-sf.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@
5959
#'
6060
#' You can also set this to one of "polygon", "line", and "point" to
6161
#' override the default legend.
62-
#' @seealso [stat_sf_coordinates()]
62+
#'
63+
#' @seealso
64+
#' The `r link_book("simple feature maps section", "maps#sec-sf")`
65+
#'
66+
#' [stat_sf_coordinates()]
6367
#' @examples
6468
#' if (requireNamespace("sf", quietly = TRUE)) {
6569
#' nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)

0 commit comments

Comments
 (0)