Skip to content

Commit 20fa50f

Browse files
committed
replace single use internal functions
1 parent c679d43 commit 20fa50f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

R/bin.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ bins <- function(breaks, closed = "right",
2525
)
2626
}
2727

28-
is_bins <- function(x) inherits(x, "ggplot2_bins")
29-
3028
#' @export
3129
print.ggplot2_bins <- function(x, ...) {
3230
n <- length(x$breaks)
@@ -133,7 +131,7 @@ bin_breaks_bins <- function(x_range, bins = 30, center = NULL,
133131
# Compute bins ------------------------------------------------------------
134132

135133
bin_vector <- function(x, bins, weight = NULL, pad = FALSE) {
136-
check_object(bins, is_bins, "a {.cls ggplot2_bins} object")
134+
check_inherits(bins, "ggplot2_bins", "a {.cls ggplot2_bins} object")
137135

138136
if (all(is.na(x))) {
139137
return(bin_out(length(x), NA, NA, xmin = NA, xmax = NA))

0 commit comments

Comments
 (0)