Skip to content

Commit

Permalink
Remove excessive examples
Browse files Browse the repository at this point in the history
Move some to the vignette. CRAN checks failed on Debian, most likely because of time out of examples.
  • Loading branch information
aphalo committed Jan 8, 2024
1 parent 681927d commit 61e20cc
Show file tree
Hide file tree
Showing 29 changed files with 1,011 additions and 836 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: ggpp
Type: Package
Title: Grammar Extensions to 'ggplot2'
Version: 0.5.5.9001
Date: 2023-12-26
Version: 0.5.6
Date: 2024-01-07
Authors@R:
c(
person("Pedro J.", "Aphalo", email = "pedro.aphalo@helsinki.fi", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-3385-972X")),
Expand Down
2 changes: 0 additions & 2 deletions R/geom-margin-arrow.r
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
#' @examples
#' p <- ggplot(mtcars, aes(wt, mpg)) +
#' geom_point()
#' p
#' p + geom_x_margin_arrow(xintercept = 3.5)
#' p + geom_y_margin_arrow(yintercept = c(18, 28, 15))
#' p + geom_x_margin_arrow(data = data.frame(x = c(2.5, 4.5)),
#' mapping = aes(xintercept = x))
Expand Down
3 changes: 0 additions & 3 deletions R/geom-margin-grob.r
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@
#' @examples
#' # We can add icons to the margin of a plot to signal events
#'
#'
#'
#'
geom_x_margin_grob <- function(mapping = NULL, data = NULL,
stat = "identity", position = "identity",
...,
Expand Down
2 changes: 0 additions & 2 deletions R/geom-margin-point.r
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
#' @examples
#' p <- ggplot(mtcars, aes(wt, mpg)) +
#' geom_point()
#' p
#' p + geom_x_margin_point(xintercept = 3.5)
#' p + geom_y_margin_point(yintercept = c(18, 28, 15))
#' p + geom_x_margin_point(data = data.frame(x = c(2.5, 4.5)),
#' mapping = aes(xintercept = x))
Expand Down
12 changes: 0 additions & 12 deletions R/geom-quadrant-lines.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@
#' geom_point()
#'
#' ggplot(my.data, aes(x, y)) +
#' geom_quadrant_lines(linetype = "dotted") +
#' geom_point()
#'
#' ggplot(my.data, aes(x, y)) +
#' geom_quadrant_lines(xintercept = 50,
#' yintercept = 10,
#' colour = "blue") +
Expand All @@ -81,14 +77,6 @@
#'
#' ggplot(my.data, aes(x, y)) +
#' geom_vhlines(xintercept = c(25, 50, 75),
#' yintercept = 10 ,
#' linetype = "dotted",
#' colour = "red") +
#' geom_point() +
#' theme_bw()
#'
#' ggplot(my.data, aes(x, y)) +
#' geom_vhlines(xintercept = c(25, 50, 75),
#' yintercept = c(10, 8),
#' linetype = "dotted",
#' colour = "red") +
Expand Down
9 changes: 0 additions & 9 deletions R/geom-table.R
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,6 @@
#' arrow = arrow(length = unit(0.5, "lines"))) +
#' theme_classic()
#'
#' # Using native plot coordinates instead of data coordinates
#' dfnpc <- tibble(x = 0.95, y = 0.95, tb = list(tb))
#'
#' ggplot(mtcars,
#' aes(wt, mpg, colour = factor(cyl))) +
#' geom_point() +
#' geom_table_npc(data = dfnpc,
#' aes(npcx = x, npcy = y, label = tb))
#'
geom_table <- function(mapping = NULL, data = NULL,
stat = "identity", position = "identity",
...,
Expand Down
37 changes: 0 additions & 37 deletions R/geom-text-linked.r
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,11 @@
#' geom_text_s(hjust = "left", nudge_x = 0.12) +
#' expand_limits(x = 6.2)
#' p +
#' geom_text_s(nudge_y = 0.1, nudge_x = 0.07) +
#' expand_limits(x = 6.2)
#' p +
#' geom_text_s(nudge_y = 1, angle = 90) +
#' expand_limits(y = 30)
#' p +
#' geom_text_s(angle = 90, nudge_y = 1,
#' arrow = arrow(length = grid::unit(1.5, "mm")),
#' colour.target = "segment", colour = "red") +
#' expand_limits(y = 30)
#' p +
#' geom_text_s(angle = 90, nudge_y = 1,
#' arrow = arrow(length = grid::unit(1.5, "mm")),
#' alpha.target = "segment", alpha = 0.3) +
#' expand_limits(y = 30)
#'
Expand All @@ -226,12 +218,6 @@
#' p +
#' geom_label_s(hjust = "outward_1", nudge_x = 0.12) +
#' expand_limits(x = 6.2)
#' p +
#' geom_label_s(hjust = "inward_3", nudge_y = 0.4)
#'
#' p +
#' geom_label_s(nudge_y = 1, angle = 90) +
#' expand_limits(y = 30)
#'
#' # Add aesthetic mappings and adjust arrows
#' p +
Expand Down Expand Up @@ -260,24 +246,6 @@
#' expand_limits(y = 27)
#'
#' p +
#' geom_label_s(aes(colour = factor(cyl)),
#' nudge_x = 0.3,
#' arrow = arrow(angle = 20,
#' length = grid::unit(1/3, "lines"))) +
#' scale_colour_discrete(l = 40) + # luminance, make colours darker
#' expand_limits(x = 7)
#'
#' p +
#' geom_label_s(aes(colour = factor(cyl)),
#' nudge_x = 0.3,
#' colour.target = c("box", "segment"),
#' linewidth = 0.6,
#' arrow = arrow(angle = 20,
#' length = grid::unit(1/3, "lines"))) +
#' scale_colour_discrete(l = 40) + # luminance, make colours darker
#' expand_limits(x = 7)
#'
#' p +
#' geom_label_s(aes(colour = factor(cyl), fill = factor(cyl)),
#' nudge_x = 0.3,
#' alpha.target = "box",
Expand All @@ -288,11 +256,6 @@
#' scale_colour_discrete(l = 40) + # luminance, make colours darker
#' expand_limits(x = 7)#' # Scale height of text, rather than sqrt(height)
#'
#' p +
#' geom_text_s(aes(size = wt), nudge_x = -0.1) +
#' scale_radius(range = c(3,6)) + # override scale_area()
#' expand_limits(x = c(1.8, 5.5))
#'
geom_text_s <- function(mapping = NULL,
data = NULL,
stat = "identity",
Expand Down
5 changes: 0 additions & 5 deletions R/geom-text-npc.r
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@
#' geom_point() +
#' geom_text_npc(data = df, aes(npcx = x, npcy = y, label = text))
#'
#' ggplot(data = mtcars, mapping = aes(wt, mpg)) +
#' geom_point() +
#' geom_text_npc(data = df, aes(npcx = x, npcy = y, label = text)) +
#' expand_limits(y = 40, x = 6)
#'
#' ggplot(data = mtcars) +
#' geom_point(mapping = aes(wt, mpg)) +
#' geom_label_npc(data = df, aes(npcx = x, npcy = y, label = text))
Expand Down
33 changes: 0 additions & 33 deletions R/geom-text-pairwise.R
Original file line number Diff line number Diff line change
Expand Up @@ -166,27 +166,6 @@
#' parse = TRUE)
#'
#' p1 +
#' geom_text_pairwise(data = my.pairs,
#' aes(xmin = A, xmax = B,
#' y = bar.height,
#' label = sprintf("italic(P)~`=`~%.2f", p.value)),
#' arrow = grid::arrow(angle = 90,
#' length = unit(1, "mm"),
#' ends = "both"),
#' parse = TRUE)
#'
#' p1 +
#' geom_text_pairwise(data = my.pairs,
#' aes(xmin = A, xmax = B,
#' y = bar.height,
#' label = sprintf("italic(P)~`=`~%.2f", p.value)),
#' colour = "red",
#' arrow = grid::arrow(angle = 90,
#' length = unit(1, "mm"),
#' ends = "both"),
#' parse = TRUE)
#'
#' p1 +
#' geom_label_pairwise(data = my.pairs,
#' aes(xmin = A, xmax = B,
#' y = bar.height,
Expand Down Expand Up @@ -237,18 +216,6 @@
#' y = bar.height, label = text))
#'
#' p2 +
#' geom_text_pairwise(data = my.ranges,
#' aes(xmin = A, xmax = B,
#' y = bar.height, label = text),
#' angle = 90, hjust = -0.1)
#'
#' p2 +
#' geom_label_pairwise(data = my.ranges,
#' aes(xmin = A, xmax = B,
#' y = bar.height, label = text),
#' angle = 90, hjust = -0.1)
#'
#' p2 +
#' geom_label_pairwise(data = my.ranges,
#' aes(xmin = A, xmax = B,
#' y = bar.height, label = text))
Expand Down
1 change: 1 addition & 0 deletions R/weather-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#' @examples
#' names(weather_18_june_2019.df)
#' head(weather_18_june_2019.df)
#' nrow(weather_18_june_2019.df)
#'
#' @references P. J. Aphalo, unpublished data.
#'
Expand Down
12 changes: 0 additions & 12 deletions man/geom_quadrant_lines.Rd

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

9 changes: 0 additions & 9 deletions man/geom_table.Rd

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

5 changes: 0 additions & 5 deletions man/geom_text_npc.Rd

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

33 changes: 0 additions & 33 deletions man/geom_text_pairwise.Rd

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

37 changes: 0 additions & 37 deletions man/geom_text_s.Rd

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

2 changes: 0 additions & 2 deletions man/geom_x_margin_arrow.Rd

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

Loading

0 comments on commit 61e20cc

Please sign in to comment.