首页 > 解决方案 > 如何使用 compare_mean() 函数?

问题描述

我需要使用 compare_mean() 和 stat_compare_means() 函数。这些是我正在使用的库

data("ToothGrowth)

当我尝试使用 compare_means 时出现此错误: compare_means(len ~ supp, data = ToothGrowth)

Error in filter_impl(.data, quo) : 
  Evaluation error: `as_dictionary()` is defunct as of rlang 0.3.0.
Please use `as_data_pronoun()` instead.

不确定问题是否取决于我使用 rlang_0.3.4 的事实。

我四处寻找可能的解决方案,但没有运气!

sessionInfo()

R version 3.3.3 (2017-03-06)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS  10.14.6

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] dplyr_0.7.2   bindrcpp_0.2  ggpubr_0.2    magrittr_1.5  ggplot2_3.1.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3       tidyr_0.6.3      withr_2.1.2      assertthat_0.2.0 grid_3.3.3       plyr_1.8.4      
 [7] R6_2.2.2         gtable_0.2.0     scales_1.0.0     rlang_0.3.4      lazyeval_0.2.0   tools_3.3.3     
[13] glue_1.3.1       munsell_0.5.0    pkgconfig_2.0.1  colorspace_1.3-2 bindr_0.1        tibble_1.3.3 

在此先感谢您的帮助。

标签: r

解决方案


我通过将 R 版本更新到 R 3.6.3 来解决我的问题。


推荐阅读