error in package installation

package-installation
#1

Hi guys,

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 

Can anyone tell me how to sort this?

Thank you.

0 Likes

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

2 Likes

#3

Dear andresrcs,

Thank you for your kind assistance. Its working now.

Regards,
Tye

0 Likes

#4

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:

0 Likes

closed #5

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

0 Likes