“无法将对象转换为函数”

时间:2019-07-12 09:42:08

标签: r dplyr

我收到以下错误

Error in mutate_impl(.data, dots) : 
  Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].

在干净的会话上运行此代码时

library(dplyr)
dplyr::mutate(data.frame(aa = c(1,2,3,4)),bb = aa/2)

这是会话信息

R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.5 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] bindrcpp_0.2.2 dplyr_0.7.4   

loaded via a namespace (and not attached):
 [1] compiler_3.4.4   magrittr_1.5     assertthat_0.2.0 R6_2.3.0         tools_3.4.4      pillar_1.2.1     glue_1.2.0       rstudioapi_0.7  
 [9] tibble_1.4.2     yaml_2.1.18      crayon_1.3.4     Rcpp_1.0.1       pkgconfig_2.0.1  rlang_0.4.0      bindr_0.1.1 

0 个答案:

没有答案