Skip to content

Commit bb2c405

Browse files
authored
Forward compatibility: fix mistakes (#6394)
1 parent 836d820 commit bb2c405

File tree

5 files changed

+5
-11
lines changed

5 files changed

+5
-11
lines changed

R/coord-.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ Coord <- ggproto("Coord",
206206

207207
#' @export
208208
#' @rdname is_tests
209-
is_coord <- function(x) inheritS(x, "Coord")
209+
is_coord <- function(x) inherits(x, "Coord")
210210

211211
#' @export
212212
#' @rdname is_tests

R/geom-defaults.R

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,13 @@ update_stat_defaults <- function(stat, new) {
8080
#'
8181
#' # Using a class
8282
#' get_geom_defaults(GeomPoint)
83-
#'
84-
#' # Changed theme
85-
#' get_geom_defaults("point", theme(geom = element_geom(ink = "purple")))
8683
get_geom_defaults <- function(geom, theme = theme_get()) {
87-
theme <- theme %||% list(geom = .default_geom_element)
84+
theme <- theme %||% list()
8885

8986
if (is.function(geom)) {
9087
geom <- geom()
9188
}
92-
if (is.layer(geom)) {
89+
if (is_layer(geom)) {
9390
data <- data_frame0(.id = 1L)
9491
data <- geom$compute_geom_2(data = data)
9592
data$.id <- NULL

R/labels.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ ggtitle <- function(label, subtitle = waiver()) {
110110
#' @param plot A ggplot object
111111
#' @description
112112
#' `get_labs()` retrieves completed labels from a plot.
113-
get_labs <- function(plot = get_last_plot()) {
113+
get_labs <- function(plot = last_plot()) {
114114
plot <- ggplot_build(plot)
115115

116116
labs <- plot$plot$labels

man/get_geom_defaults.Rd

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

man/labs.Rd

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

0 commit comments

Comments
 (0)