0
votes

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

2
The error explains the problem. The package knitr was not found. install.packages('knitr'). Alternatively it is likely to be fixable just executing install.packages("dplyr", dependencies = TRUE) to install all dependencies.Oliver

2 Answers

1
votes

Have you tried

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

?

Let me know if this doesn't work.

0
votes

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