首页 > 解决方案 > How to install and load dplyr without errors?

问题描述

I am currently practicing R programming through swirl package. And I am stuck at the installation steps in one of the courses with the following error.

| 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.

Even if I try to install it manually and it succeeds I am unable to load it because of following error.

> 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 

I have tried to remove, reinstall and update the packages. Nothing seems to work. Please Help

标签: rerror-handlingdplyrpackageloading

解决方案


任何一个

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


推荐阅读