重新加载rStudio时,工作代码停止工作

时间:2019-12-10 01:21:41

标签: r dplyr rstudio

我有几块使用管道的代码,当我重新加载以前从未发生过的rStudio时,其中许多已经停止工作。之前的代码如下:

library(dplyr)
df <- data.frame(a = c("A", "B", "A","B" ,"A" ,"B"), b = c(1, 2, 3,4,5,6))
df %>% count(a)

但是现在它告诉我Error in UseMethod("as.quoted") : no applicable method for 'as.quoted' applied to an object of class "function"必须写为:

count(df$a)

或:

df %>% count(vars="a")

关于我可以做什么的任何想法? rStudio说它是最新的,我正在使用R 3.6.1,并且我还尝试了重新安装dplyr。

编辑: 这是来自sessionInfo()的信息

R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
[1] shiny_1.4.0     lubridate_1.7.4 tidyr_1.0.0     plyr_1.8.4     
[5] dplyr_0.8.3    

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3       rstudioapi_0.10  knitr_1.26       magrittr_1.5    
 [5] tidyselect_0.2.5 xtable_1.8-4     R6_2.4.1         rlang_0.4.2     
 [9] fastmap_1.0.1    stringr_1.4.0    tools_3.6.1      xfun_0.11       
[13] htmltools_0.4.0  assertthat_0.2.1 digest_0.6.23    tibble_2.1.3    
[17] lifecycle_0.1.0  crayon_1.3.4     later_1.0.0      purrr_0.3.3     
[21] promises_1.1.0   vctrs_0.2.0      rsconnect_0.8.15 zeallot_0.1.0   
[25] mime_0.7         glue_1.3.1       stringi_1.4.3    compiler_3.6.1  
[29] pillar_1.4.2     backports_1.1.5  httpuv_1.5.2     pkgconfig_2.0.3

0 个答案:

没有答案