I can install lubridate in R but i can not in Rstudio... I am newby

Hi guys. I am really newby into the programming world and few days ago I installed R and Rstudio. I wanted install tidyverse and then lubridate. Rstudio failled In the second action as you can see...

However I did the same in R and results were Ok

I hope anybody can help me. Thanks so much.

Check to see if you have the directory and file shown on the next-to-last line.

Perhaps lubridate hasn't been actually installed yet.

First type install.packages("lubridate") like you did with tidyverse in the screenshot you shared.

Then try library(lubridate) again.

3 Likes

Thanks so much, but the directory is the same.

Thanks for the sugestion, but I can not fix it.

install.packages("lubridate")
Installing package into ‘C:/Users/rune_/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/lubridate_1.9.0.zip'
Content type 'application/zip' length 942344 bytes (920 KB)
downloaded 920 KB

package ‘lubridate’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘lubridate’
Warning in install.packages :
problem copying C:\Users\rune_\AppData\Local\R\win-library\4.2\00LOCK\lubridate\libs\x64\lubridate.dll to C:\Users\rune_\AppData\Local\R\win-library\4.2\lubridate\libs\x64\lubridate.dll: Permission denied
Warning in install.packages :
restored ‘lubridate’

The downloaded binary packages are in
C:\Users\rune_\AppData\Local\Temp\Rtmpk1ku5z\downloaded_packages

library(lubridate)
Error: package or namespace load failed for ‘lubridate’ in inDL(x, as.logical(local), as.logical(now), ...):
unable to load shared object 'C:/Program Files/R/R-4.2.2/library/stats/libs/x64/stats.dll':
LoadLibrary failure: No se puede encontrar el módulo especificado.

This indicates that the process user lacks write privileges. I've heard that running as an administrator can fix this, but my own experience with Windows is so long ago that I have no first-hand experience.

Your installation of the lubridatepackage is corrupted, try manually deleting the package (the whole folder) and installing again.

This topic was automatically closed 42 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.