Skip to content

Commit c84d9a0

Browse files
authored
No plyr (#3013)
1 parent ec245e0 commit c84d9a0

Some content is hidden

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

52 files changed

+502
-115
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Imports:
2626
lazyeval,
2727
MASS,
2828
mgcv,
29-
plyr (>= 1.7.1),
3029
reshape2,
3130
rlang (>= 0.2.1),
3231
scales (>= 0.5.0),
@@ -71,6 +70,7 @@ Collate:
7170
'aes-group-order.r'
7271
'aes-linetype-size-shape.r'
7372
'aes-position.r'
73+
'compat-plyr.R'
7474
'utilities.r'
7575
'aes.r'
7676
'legend-draw.r'

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ export(element_grob)
284284
export(element_line)
285285
export(element_rect)
286286
export(element_text)
287+
export(empty)
287288
export(enexpr)
288289
export(enexprs)
289290
export(enquo)
@@ -579,7 +580,6 @@ import(grid)
579580
import(gtable)
580581
import(scales)
581582
importFrom(lazyeval,f_eval)
582-
importFrom(plyr,defaults)
583583
importFrom(rlang,.data)
584584
importFrom(rlang,enexpr)
585585
importFrom(rlang,enexprs)

R/aes-group-order.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#' rescale01 <- function(x) (x - min(x)) / diff(range(x))
3434
#' ec_scaled <- data.frame(
3535
#' date = economics$date,
36-
#' plyr::colwise(rescale01)(economics[, -(1:2)]))
36+
#' lapply(economics[, -(1:2)], rescale01))
3737
#' ecm <- reshape2::melt(ec_scaled, id.vars = "date")
3838
#' f <- ggplot(ecm, aes(date, value))
3939
#' f + geom_line(aes(linetype = variable))

R/aes.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#' @include utilities.r
1+
#' @include utilities.r compat-plyr.R
22
NULL
33

44
#' Construct aesthetic mappings
@@ -157,7 +157,7 @@ standardise_aes_names <- function(x) {
157157
x <- sub("color", "colour", x, fixed = TRUE)
158158

159159
# convert old-style aesthetics names to ggplot version
160-
plyr::revalue(x, ggplot_global$base_to_ggplot, warn_missing = FALSE)
160+
revalue(x, ggplot_global$base_to_ggplot)
161161
}
162162

163163
# x is a list of aesthetic mappings, as generated by aes()

R/bench.r

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ benchplot <- function(x) {
2222
draw <- system.time(grid.draw(grob))
2323

2424
times <- rbind(construct, build, render, draw)[, 1:3]
25+
times <- rbind(times, colSums(times))
2526

26-
plyr::unrowname(base::data.frame(
27+
cbind(
2728
step = c("construct", "build", "render", "draw", "TOTAL"),
28-
rbind(times, colSums(times))))
29+
mat_2_df(times)
30+
)
2931
}

0 commit comments

Comments
 (0)