I am having trouble with basic installing packages and library calling

雨燕双飞 提交于 2021-02-11 14:34:58

问题


When I execute

install.packages("dplyr")

I get

Error: invalid version specification ‘NA’ In addition: Warning message: In utils:::packageDescription(packageName, fields = "Version") : no package 'knitr' was found

Then I call the library and it obviously doesn't work either -

library(dplyr)

Error: package or namespace load failed for ‘dplyr’: .onLoad failed in loadNamespace() for 'pillar', details: call: utils::packageVersion("vctrs") error: package ‘vctrs’ not found In addition: Warning message: package ‘dplyr’ was built under R version 3.5.3

I am trying to use %>% and mutate. Will not post that full code due to company policy. I just need help with why something as simple as installing packages and calling libraries doesn't work for me...


回答1:


Have you tried

 install.packages('knitr', dependencies = TRUE)

?

Let me know if this doesn't work.




回答2:


I needed to install vctrs and knitr first. Then dplyr worked... I have know idea why this is so hard. It's supposed to be the easy part...



来源:https://stackoverflow.com/questions/60867050/i-am-having-trouble-with-basic-installing-packages-and-library-calling

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!