Skip to content

No plyr #3013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Dec 13, 2018
Merged

No plyr #3013

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Imports:
lazyeval,
MASS,
mgcv,
plyr (>= 1.7.1),
reshape2,
rlang (>= 0.2.1),
scales (>= 0.5.0),
Expand Down Expand Up @@ -71,6 +70,7 @@ Collate:
'aes-group-order.r'
'aes-linetype-size-shape.r'
'aes-position.r'
'compat-plyr.R'
'utilities.r'
'aes.r'
'legend-draw.r'
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ export(element_grob)
export(element_line)
export(element_rect)
export(element_text)
export(empty)
export(enexpr)
export(enexprs)
export(enquo)
Expand Down Expand Up @@ -579,7 +580,6 @@ import(grid)
import(gtable)
import(scales)
importFrom(lazyeval,f_eval)
importFrom(plyr,defaults)
importFrom(rlang,.data)
importFrom(rlang,enexpr)
importFrom(rlang,enexprs)
Expand Down
2 changes: 1 addition & 1 deletion R/aes-group-order.r
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#' rescale01 <- function(x) (x - min(x)) / diff(range(x))
#' ec_scaled <- data.frame(
#' date = economics$date,
#' plyr::colwise(rescale01)(economics[, -(1:2)]))
#' lapply(economics[, -(1:2)], rescale01))
#' ecm <- reshape2::melt(ec_scaled, id.vars = "date")
#' f <- ggplot(ecm, aes(date, value))
#' f + geom_line(aes(linetype = variable))
Expand Down
4 changes: 2 additions & 2 deletions R/aes.r
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @include utilities.r
#' @include utilities.r compat-plyr.R
NULL

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

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

# x is a list of aesthetic mappings, as generated by aes()
Expand Down
6 changes: 4 additions & 2 deletions R/bench.r
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ benchplot <- function(x) {
draw <- system.time(grid.draw(grob))

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

plyr::unrowname(base::data.frame(
cbind(
step = c("construct", "build", "render", "draw", "TOTAL"),
rbind(times, colSums(times))))
mat_2_df(times)
)
}
Loading