Skip to content

Commit ffa1878

Browse files
committed
1 parent 5b6cc1c commit ffa1878

File tree

7 files changed

+10
-13
lines changed

7 files changed

+10
-13
lines changed

DESCRIPTION

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ Imports:
4141
dplyr,
4242
vctrs,
4343
tibble,
44-
lazyeval (>= 0.2.0),
4544
rlang (>= 0.4.10),
4645
crosstalk,
4746
purrr,

NAMESPACE

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,12 @@ importFrom(httr,write_disk)
250250
importFrom(jsonlite,parse_json)
251251
importFrom(jsonlite,read_json)
252252
importFrom(jsonlite,toJSON)
253-
importFrom(lazyeval,all_dots)
254-
importFrom(lazyeval,f_eval)
255-
importFrom(lazyeval,f_new)
256-
importFrom(lazyeval,is_formula)
257-
importFrom(lazyeval,is_lang)
258253
importFrom(magrittr,"%>%")
259254
importFrom(purrr,transpose)
260255
importFrom(rlang,"!!!")
261256
importFrom(rlang,"!!")
262257
importFrom(rlang,eval_tidy)
258+
importFrom(rlang,is_formula)
263259
importFrom(rlang,is_na)
264260
importFrom(stats,complete.cases)
265261
importFrom(stats,is.leaf)

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## Improvements
44

55
* `ggplotly()` now works better with the development version of ggplot2 (> v3.4.4). (#2315)
6+
* plotly no longer imports lazyeval (@olivroy, #2319)
7+
68

79
# 4.10.3
810

@@ -1342,3 +1344,4 @@ For ggplotly:
13421344

13431345
Merge ggplotly code.
13441346

1347+
# 0.3.5

R/ggplotly.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,10 +1120,10 @@ gg2list <- function(p, width = NULL, height = NULL,
11201120
mappingFormulas <- lapply(layers, function(x) {
11211121
mappings <- getAesMap(plot, x)
11221122
if (originalData) {
1123-
lapply(mappings, lazyeval::f_new)
1123+
lapply(mappings, function(x) rlang::new_formula(lhs = NULL, rhs = x))
11241124
} else {
11251125
nms <- names(mappings)
1126-
setNames(lapply(nms, function(x) lazyeval::f_new(as.name(x))), nms)
1126+
setNames(lapply(nms, function(x) rlang::new_formula(lhs = NULL, rhs = as.name(x))), nms)
11271127
}
11281128
})
11291129

R/imports.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
#' @importFrom jsonlite toJSON parse_json read_json
99
#' @importFrom httr RETRY content config add_headers authenticate stop_for_status warn_for_status write_disk
1010
#' @importFrom htmlwidgets createWidget sizingPolicy saveWidget onRender prependContent
11-
#' @importFrom lazyeval f_eval is_formula all_dots is_lang f_new
1211
#' @importFrom tibble as_tibble
1312
#' @importFrom htmltools browsable tagList tags div
1413
#' @importFrom purrr transpose
1514
#' @importFrom tools file_ext file_path_sans_ext
1615
#' @importFrom data.table as.data.table setorderv
17-
#' @importFrom rlang eval_tidy !! !!!
16+
#' @importFrom rlang eval_tidy !! !!! is_formula
1817
NULL
1918

2019

R/plotly_build.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,9 +1003,9 @@ traceify <- function(dat, x = NULL) {
10031003
return(new_dat)
10041004
}
10051005

1006-
1006+
# Previously used lazyeval #2319
10071007
eval_attr <- function(x, data = NULL) {
1008-
if (lazyeval::is_formula(x)) lazyeval::f_eval(x, data) else x
1008+
if (rlang::is_formula(x)) rlang::eval_tidy(rlang::f_rhs(x), data = data) else x
10091009
}
10101010

10111011
# overwrite defaults with the user defined palette

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ verify_key_type <- function(p) {
837837
p$x$data[[i]]$`_isSimpleKey` <- TRUE
838838
p$x$data[[i]]$`_isNestedKey` <- FALSE
839839
}
840-
p$x$data[[i]]$`_isNestedKey` <- p$x$data[[i]]$`_isNestedKey` %||% !lazyeval::is_atomic(k)
840+
p$x$data[[i]]$`_isNestedKey` <- p$x$data[[i]]$`_isNestedKey` %||% !rlang::is_atomic(k)
841841
# key values should always be strings
842842
if (p$x$data[[i]]$`_isNestedKey`) {
843843
p$x$data[[i]]$key <- lapply(p$x$data[[i]]$key, function(x) I(as.character(x)))

0 commit comments

Comments
 (0)