|
25 | 25 | #' @keywords internal |
26 | 26 | NULL |
27 | 27 |
|
28 | | -lazy_deprec <- function( |
29 | | - fun, |
30 | | - hint = TRUE, |
31 | | - env = caller_env(), |
32 | | - user_env = caller_env(2) |
33 | | -) { |
34 | | - lifecycle::deprecate_warn( |
| 28 | +lazy_deprec <- function(fun, hint = TRUE) { |
| 29 | + lifecycle::deprecate_stop( |
35 | 30 | when = "0.7.0", |
36 | 31 | what = paste0(fun, "_()"), |
37 | 32 | with = paste0(fun, "()"), |
38 | | - details = if (hint) "See vignette('programming') for more help", |
39 | | - env = env, |
40 | | - user_env = user_env, |
41 | | - always = TRUE |
| 33 | + details = if (hint) "See vignette('programming') for more help" |
42 | 34 | ) |
43 | 35 | } |
44 | 36 |
|
@@ -301,11 +293,10 @@ rename_.grouped_df <- function(.data, ..., .dots = list()) { |
301 | 293 | #' @export |
302 | 294 | #' @rdname se-deprecated |
303 | 295 | rename_vars_ <- function(vars, args) { |
304 | | - lifecycle::deprecate_warn( |
| 296 | + lifecycle::deprecate_stop( |
305 | 297 | "0.7.0", |
306 | 298 | "rename_vars_()", |
307 | | - "tidyselect::vars_rename()", |
308 | | - always = TRUE |
| 299 | + "tidyselect::vars_rename()" |
309 | 300 | ) |
310 | 301 | args <- compat_lazy_dots(args, caller_env()) |
311 | 302 | tidyselect::vars_rename(vars, !!!args) |
@@ -333,11 +324,10 @@ select_.grouped_df <- function(.data, ..., .dots = list()) { |
333 | 324 | #' include/exclude. |
334 | 325 | #' @export |
335 | 326 | select_vars_ <- function(vars, args, include = chr(), exclude = chr()) { |
336 | | - lifecycle::deprecate_warn( |
| 327 | + lifecycle::deprecate_stop( |
337 | 328 | "0.7.0", |
338 | 329 | "select_vars_()", |
339 | | - "tidyselect::vars_select()", |
340 | | - always = TRUE |
| 330 | + "tidyselect::vars_select()" |
341 | 331 | ) |
342 | 332 | args <- compat_lazy_dots(args, caller_env()) |
343 | 333 | tidyselect::vars_select(vars, !!!args, .include = include, .exclude = exclude) |
@@ -391,91 +381,37 @@ summarize_ <- summarise_ |
391 | 381 | #' @keywords internal |
392 | 382 | #' @export |
393 | 383 | summarise_each <- function(tbl, funs, ...) { |
394 | | - summarise_each_impl(tbl, funs, enquos(...), "summarise_each") |
| 384 | + summarise_each_impl("summarise_each") |
395 | 385 | } |
396 | 386 | #' @export |
397 | 387 | #' @rdname summarise_each |
398 | 388 | summarise_each_ <- function(tbl, funs, vars) { |
399 | | - summarise_each_impl(tbl, funs, vars, "summarise_each_") |
| 389 | + summarise_each_impl("summarise_each_") |
400 | 390 | } |
401 | | -summarise_each_impl <- function( |
402 | | - tbl, |
403 | | - funs, |
404 | | - vars, |
405 | | - name, |
406 | | - env = caller_env(), |
407 | | - user_env = caller_env(2) |
408 | | -) { |
409 | | - what <- paste0(name, "()") |
410 | | - |
411 | | - lifecycle::deprecate_warn( |
| 391 | +summarise_each_impl <- function(name) { |
| 392 | + lifecycle::deprecate_stop( |
412 | 393 | when = "0.7.0", |
413 | | - what = what, |
414 | | - with = "across()", |
415 | | - always = TRUE, |
416 | | - env = env, |
417 | | - user_env = user_env |
| 394 | + what = paste0(name, "()"), |
| 395 | + with = "across()" |
418 | 396 | ) |
419 | | - |
420 | | - if (is_empty(vars)) { |
421 | | - vars <- tbl_nongroup_vars(tbl) |
422 | | - } else { |
423 | | - vars <- compat_lazy_dots(vars, user_env) |
424 | | - vars <- tidyselect::vars_select(tbl_nongroup_vars(tbl), !!!vars) |
425 | | - if (length(vars) == 1 && names(vars) == as_string(vars)) { |
426 | | - vars <- unname(vars) |
427 | | - } |
428 | | - } |
429 | | - if (is_character(funs)) { |
430 | | - funs <- funs_(funs) |
431 | | - } |
432 | | - funs <- manip_at(tbl, vars, funs, enquo(funs), user_env, .caller = name) |
433 | | - summarise(tbl, !!!funs) |
434 | 397 | } |
435 | 398 |
|
436 | 399 | #' @export |
437 | 400 | #' @rdname summarise_each |
438 | 401 | mutate_each <- function(tbl, funs, ...) { |
439 | | - if (is_character(funs)) { |
440 | | - funs <- funs_(funs) |
441 | | - } |
442 | | - mutate_each_impl(tbl, funs, enquos(...), "mutate_each") |
| 402 | + mutate_each_impl("mutate_each") |
443 | 403 | } |
444 | 404 | #' @export |
445 | 405 | #' @rdname summarise_each |
446 | 406 | mutate_each_ <- function(tbl, funs, vars) { |
447 | | - mutate_each_impl(tbl, funs, vars, "mutate_each_") |
| 407 | + mutate_each_impl("mutate_each_") |
448 | 408 | } |
449 | | -mutate_each_impl <- function( |
450 | | - tbl, |
451 | | - funs, |
452 | | - vars, |
453 | | - name, |
454 | | - env = caller_env(), |
455 | | - user_env = caller_env(2) |
456 | | -) { |
457 | | - what <- paste0(name, "()") |
458 | | - |
459 | | - lifecycle::deprecate_warn( |
| 409 | +mutate_each_impl <- function(name) { |
| 410 | + lifecycle::deprecate_stop( |
460 | 411 | when = "0.7.0", |
461 | | - what = what, |
462 | | - with = "across()", |
463 | | - always = TRUE, |
464 | | - env = env, |
465 | | - user_env = user_env |
| 412 | + what = paste0(name, "()"), |
| 413 | + with = "across()" |
466 | 414 | ) |
467 | | - |
468 | | - if (is_empty(vars)) { |
469 | | - vars <- tbl_nongroup_vars(tbl) |
470 | | - } else { |
471 | | - vars <- compat_lazy_dots(vars, user_env) |
472 | | - vars <- tidyselect::vars_select(tbl_nongroup_vars(tbl), !!!vars) |
473 | | - if (length(vars) == 1 && names(vars) == as_string(vars)) { |
474 | | - vars <- unname(vars) |
475 | | - } |
476 | | - } |
477 | | - funs <- manip_at(tbl, vars, funs, enquo(funs), user_env, .caller = name) |
478 | | - mutate(tbl, !!!funs) |
479 | 415 | } |
480 | 416 |
|
481 | 417 | #' @rdname summarise_each |
|
0 commit comments