2

我试图使用 tidymodels 并且在安装这个包时它还安装了我认为的某些依赖包。发布后,每当我运行一些基于 dplyr 的独立代码或我的闪亮应用程序时,我一直收到此错误,该应用程序在此之前运行良好。我该如何解决这个问题:

library(readr)
library(dplyr)
uscities <- read_csv("https://gist.githubusercontent.com/senthilthyagarajan/f2e7839a08a377c698d9235bb1bcc0bb/raw/3d4e40b422e5535389804d6e2390b674241ca045/uscities.csv")
#View(uscities)

uscities <- uscities %>% select(city,city_ascii,state_id,state_name,population,lat,lng)
Error: `...` is not empty.

We detected these problematic arguments:
* `logical`

These dots only exist to allow future extensions and should be empty.
Did you misspecify an argument?
Run `rlang::last_error()` to see where the error occurred.

所以我做到了sessionInfo(),这就是我得到的:

> rm(list=ls())
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.5

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
[1] compiler_3.6.1 tools_3.6.1    packrat_0.5.0 
> library(readr)
> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> uscities <- read_csv("https://gist.githubusercontent.com/senthilthyagarajan/f2e7839a08a377c698d9235bb1bcc0bb/raw/3d4e40b422e5535389804d6e2390b674241ca045/uscities.csv")
Parsed with column specification:
cols(
  city = col_character(),
  city_ascii = col_character(),
  state_id = col_character(),
  state_name = col_character(),
  county_fips = col_double(),
  county_name = col_character(),
  county_fips_all = col_character(),
  county_name_all = col_character(),
  lat = col_double(),
  lng = col_double(),
  population = col_double(),
  density = col_double(),
  source = col_character(),
  military = col_logical(),
  incorporated = col_logical(),
  timezone = col_character(),
  ranking = col_double(),
  zips = col_character(),
  id = col_double()
)
> #View(uscities)
> 
> uscities <- uscities %>% dplyr::select(city)
Error: `...` is not empty.

We detected these problematic arguments:
* `logical`

These dots only exist to allow future extensions and should be empty.
Did you misspecify an argument?

所以我确实尝试了 rlang::last_trace() 并得到了这个

> rlang::last_trace()
<error/rlib_error_dots_nonempty>
`...` is not empty.

We detected these problematic arguments:
* `logical`

These dots only exist to allow future extensions and should be empty.
Did you misspecify an argument?
Backtrace:
     █
  1. └─uscities %>% dplyr::select(city)
  2.   ├─base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3.   └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
  4.     └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
  5.       └─`_fseq`(`_lhs`)
  6.         └─magrittr::freduce(value, `_function_list`)
  7.           ├─base::withVisible(function_list[[k]](value))
  8.           └─function_list[[k]](value)
  9.             ├─dplyr::select(., city)
 10.             └─dplyr:::select.data.frame(., city)
 11.               └─tidyselect::vars_select(tbl_vars(.data), !!!enquos(...))
 12.                 └─tidyselect:::eval_select_impl(...)
 13.                   ├─tidyselect:::with_subscript_errors(...)
 14.                   │ ├─base::tryCatch(...)
 15.                   │ │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
 16.                   │ │   └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
 17.                   │ │     └─base:::doTryCatch(return(expr), name, parentenv, handler)
 18.                   │ └─tidyselect:::instrument_base_errors(expr)
 19.                   │   └─base::withCallingHandlers(...)
 20.                   └─tidyselect:::vars_select_eval(...)
 21.                     └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
 22.                       └─tidyselect:::eval_c(expr, data_mask, context_mask)
 23.                         └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
 24.                           └─tidyselect:::walk_data_tree(init, data_mask, context_mask)
 25.                             └─tidyselect:::as_indices_sel_impl(...)
 26.                               └─tidyselect:::as_indices_impl(x, vars, strict = strict)
 27.                                 └─vctrs::vec_as_subscript(x, logical = "error")
 28.                                   └─ellipsis::check_dots_empty()
 29.                                     └─ellipsis:::action_dots(...)
4

1 回答 1

0

这是 vctrs package 的问题。我可以从 rlang 跟踪错误日志中看到它

于 2020-02-14T16:03:21.733 回答