Package source: rlang_1.1.1.tar.gz Windows binaries: r-devel: rlang_1.1.1.zip, r-release: rlang_1.1.1.zip, r-oldrel: rlang_1.1.1.zip macOS binaries: r-release (arm64): rlang_1.1.1.tgz, r-oldrel (arm64): rlang_1.1.1.tgz, r-release (x86_64): rlang_1.1.1.tgz, r-oldrel (x86_64): rlang_1.1.1.tgz翻译
这段文字介绍了 rlang 1.1.1 的软件包源代码和不同操作系统的二进制文件下载链接,其中 Windows 操作系统有 r-devel、r-release 和 r-oldrel 三种版本的二进制文件可供下载,而 macOS 操作系统则有 r-release (arm64)、r-oldrel (arm64)、r-release (x86_64) 和 r-oldrel (x86_64) 四种版本的二进制文件可供下载。
> merged_data1 <- left_join(file1, file2, by = "staxids_X", all.x = TRUE) Error in `left_join()`: ! `...` must be empty. ✖ Problematic argument: • all.x = TRUE Run `rlang::last_trace()` to see where the error occurred.是怎么回事
这个错误可能是因为 left_join()
函数的参数传递方式不正确导致的。left_join()
函数的第一个参数应该是左连接的数据框,第二个参数是右连接的数据框,第三个参数是连接的列名。在你的代码中,第一个参数和第二个参数之间使用了 by
参数,这并不符合函数的使用方式。另外,all.x
参数也应该作为 left_join()
函数的参数之一传递,而不是在 by
参数之后。
你可以尝试以下代码,将 by
和 all.x
参数分别传递给 left_join()
函数:
merged_data1 <- left_join(file1, file2, by = "staxids_X", all.x = TRUE)
如果问题仍然存在,请运行 rlang::last_trace()
命令以查看更详细的错误信息,以便更好地解决问题。
> diamonds_train_processed <- prep(diamonds_recipe) %>% juice(diamonds_train) Warning: Using an external vector in selections was deprecated in tidyselect 1.1.0. ℹ Please use `all_of()` or `any_of()` instead. # Was: data %>% select(diamonds_train) # Now: data %>% select(all_of(diamonds_train)) See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>. This warning is displayed once every 8 hours. Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated. Error in `juice()`: ! Can't subset columns with `diamonds_train`. ✖ `diamonds_train` must be numeric or character, not a <tbl_df/tbl/data.frame> object. Backtrace: 1. prep(diamonds_recipe) %>% juice(diamonds_train) 17. rlang::cnd_signal(x)
这个错误的原因是因为diamonds_train
是一个数据框(data frame),而不是字符向量(character vector)或数值向量(numeric vector)。因此,你需要传递diamonds_train
中所有要保留的列的名称。修改后的代码如下:
diamonds_train_processed <- prep(diamonds_recipe) %>% juice(all_of(names(diamonds_train)))
这将使用all_of()
函数将names(diamonds_train)
转换为字符串向量,以便juice()
函数可以正确选择处理后的数据集中的列。
相关推荐

















