【问题标题】:How to install and load dplyr without errors?如何安装和加载 dplyr 而不会出错?
【发布时间】:2020-09-10 01:10:29
【问题描述】:

我目前正在通过 swirl 包练习 R 编程。我被困在其中一门课程的安装步骤中,出现以下错误。

| This lesson requires the ‘dplyr’ package. Would you like me to install it for
| you now?

1: Yes
2: No

Selection: 1

| Trying to install package ‘dplyr’ now...
package ‘dplyr’ successfully unpacked and MD5 sums checked

| Could not install package ‘dplyr’!

  |                                                                            
  |                                                                      |   0%Error in seq.default(0, 1, length.out = nrow(e$les)) : 
  argument 'length.out' must be of length 1

| Leaving swirl now. Type swirl() to resume.

即使我尝试手动安装它并成功,由于以下错误,我无法加载它。

> library(dplyr)
Error: package or namespace load failed for ‘dplyr’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘rlang’ 0.4.5 is already loaded, but >= 0.4.6 is required 

我已尝试删除、重新安装和更新软件包。似乎没有任何效果。请帮忙

【问题讨论】:

    标签: r error-handling dplyr package loading


    【解决方案1】:

    要么

    install.packages("dplyr", dependencies = TRUE)
    

    或者回去先做

    install.pacakges("rlang")
    

    然后安装dplyr

    欢迎来到包装地狱。这是你的班卓琴。昨晚我必须安装 4 层深的软件包,然后才能加载所有 tidyverse。这很乏味但可行。

    https://www.google.com/search?source=univ&tbm=isch&q=welcome+to+hell.+here%27s+your+banjo&client=firefox-b-1-e&sa=X&ved=2ahUKEwi2wMPGosnpAhWSIDQIHX7JBC0QsAR6BAgIEAE&biw=1600&bih=805#imgrc=mlE1KJg7CKY-5M

    【讨论】:

      猜你喜欢
      • 2023-01-09
      • 1970-01-01
      • 2021-02-09
      • 2015-07-26
      • 1970-01-01
      • 2017-04-27
      • 2020-05-14
      • 2017-07-08
      • 1970-01-01
      相关资源
      最近更新 更多