i am new to R and i face some problems while installing packages, hope you guys can assist. While installing package haven and lubridate, i face the following warning/error;
packagelocation <- "G:/ Research/R libraries"
.libPaths(packagelocation)
#install.packages("haven", lib = packagelocation)
#install.packages("lubridate", lib = packagelocation)
library("haven", lib.loc = packagelocation)
Error in library("haven", lib.loc = packagelocation) :
there is no package called ‘haven’
library("tidyverse", lib.loc = packagelocation)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘lubridate’
In addition: Warning message:
package ‘tidyverse’ was built under R version 3.5.2
Is this the exact code that you are using for installing the packages?
If so, you have an extra space in the path "G:/ Research/R libraries" and the install commands are commented with #, so, they have not been executed.
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: