broom icon indicating copy to clipboard operation
broom copied to clipboard

warning with `rlang 0.3.0`

Open IndrajeetPatil opened this issue 8 years ago • 3 comments

I am getting the following rlang-related warning in my package checks and I traced it back to broom functions that rely on rlang. This warning will turn into error from next release of rlang, so it'll be good to take care of it sooner than later. Thanks.

# setup
options(warn = 2)
library(sjstats)
#> Registered S3 methods overwritten by 'ggplot2':
#>   method         from 
#>   [.quosures     rlang
#>   c.quosures     rlang
#>   print.quosures rlang
library(broom)
set.seed(123)

# load sample data
data(efc)

# fit linear model
fit <- aov(
  c12hour ~ as.factor(e42dep) + as.factor(c172code) + c160age,
  data = efc
)

# tidy output
broom::tidy(fit)
#> Error: (converted from warning) Prefixing `UQS()` with the rlang namespace is deprecated as of rlang 0.3.0.
#> Please use the non-prefixed form or `!!!` instead.
#> 
#>   # Bad:
#>   rlang::expr(mean(rlang::UQS(args)))
#> 
#>   # Ok:
#>   rlang::expr(mean(UQS(args)))
#> 
#>   # Good:
#>   rlang::expr(mean(!!!args))
#> 
#> This warning is displayed once per session.

traceback()

11: doWithOneRestart(return(expr), restart)
10: withOneRestart(expr, restarts[[1L]])
9: withRestarts({
       .Internal(.signalCondition(cond, message, call))
       .Internal(.dfltWarn(message, call))
   }, muffleWarning = function() NULL)
8: warning(warningCondition(msg, old = old, new = new, package = package, 
       class = "deprecatedWarning"))
7: .Deprecated(msg = x)
6: list2(...)
5: recode.character(colnames(ret), rlang::UQS(renamers))
4: dplyr::recode(colnames(ret), rlang::UQS(renamers))
3: tidy.anova(s[[1]])
2: tidy.aov(fit)
1: broom::tidy(fit)

Created on 2018-11-27 by the reprex package (v0.2.1)

IndrajeetPatil avatar Nov 27 '18 21:11 IndrajeetPatil

Right, will take care of this in 0.5.1 then.

alexpghayes avatar Nov 27 '18 21:11 alexpghayes

I'll work on this.

khailper avatar Jan 19 '19 16:01 khailper

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

github-actions[bot] avatar Mar 07 '21 00:03 github-actions[bot]