问题
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