Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation problem - Error in as.POSIXlt #574

Closed
hylaarborea opened this issue Sep 4, 2017 · 4 comments
Closed

installation problem - Error in as.POSIXlt #574

hylaarborea opened this issue Sep 4, 2017 · 4 comments

Comments

@hylaarborea
Copy link

hylaarborea commented Sep 4, 2017

I am trying to install lubridate but I have always the same error message. Looking around it looks related to the fact that it has a function date() which already exist also as base::date(). But during the test of the package it calls date() and therefore the error.

Here the details:
https://stackoverflow.com/questions/45959714/r-lubridate-package-installation-error-in-as-posixlt

It looks like I am the only one to have this problem. I tried to install also an old version of R, to add or remove other packages but I have always the same error...
Maybe someone here can help?

@DavisVaughan
Copy link
Member

@hylaarborea, this may help you. Just solved a similar problem.

business-science/tidyquant#62

Look at the very bottom of this issue for the section on an .Rprofile script. If that .Rprofile script has a .Last function defined that calls date() then it will crash the installation of lubridate.

@hylaarborea
Copy link
Author

Thanks @DavisVaughan
it was just because the line
cat(paste(date(),"\nAdios\n"))
in the file:
~/.Rprofile

@pgensler
Copy link

@DavisVaughan @hylaarborea It may be worth noting that you can indeed edit your .Rprofile from this:
https://csgillespie.github.io/efficientR/3-3-r-startup.html#rprofile
So maybe a simple purrr script that iterates over the items in your .Rprofile, and if it detects that the .Last function is there, just delete it/remove that line? I would think this is a bad practice, but good to know it's possible to develop a workaround to remove the line.

@vspinu
Copy link
Member

vspinu commented Oct 1, 2017

This issue was caused by lubridate. We were not handling missing argument to date. Sorry for the trouble. Now fixed in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants