Issues Installing Lubridate 1.3.3 in RStudio 4.1.0

Hi everyone, I'm trying to install version 1.3.3 of the package Lubridate in RStudio 4.1.0. When I type

> require(devtools)
> install_version("lubridate", version = "1.3.3", repos = "http://cran.us.r-project.org")

the following message appears:

Error in args(f) : object '.build_locale_regs' not found
Error: unable to load R code in package 'lubridate'
Execution halted
ERROR: lazy loading failed for package 'lubridate'
* removing 'C:/Users/orang/Documents/R/win-library/4.1/lubridate'
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/orang/AppData/Local/Temp/RtmpGmVLlE/remotes390c61ddce5/lubridate’ had non-zero exit status

How do I successfully install this package? Thank you for your help.

Hello @beck ,

I cannot help you with this.
Are you sure that you can't work with the latest version (1.7.10) of lubridate ?

Regards Han

Hi,
The reason I'm attempting to use version 1.3.3 is because it's the most recent version to use new_interval before lubridate changed it over to interval. I am trying to install package teamlucc from azvoleff/teamlucc: TEAM land use and cover change data processing toolkit version 0.46 from GitHub, but when I run

> remotes::install_github("azvoleff/teamlucc")

I get the error

Error: object 'new_interval' is not exported by 'namespace:lubridate'
Execution halted
ERROR: lazy loading failed for package 'teamlucc'
* removing 'C:/Users/orang/Documents/R/win-library/4.1/teamlucc'
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/orang/AppData/Local/Temp/RtmpGmVLlE/file390c47c6ad3/teamlucc_0.46.tar.gz’ had non-zero exit status

Is there a better way of solving this core problem other than using lubridate 1.3.3?

Hello @Beck,

I understand your problem.
I tried to install the package myself and got a different error:

devtools::install_github('azvoleff/teamlucc')
....
ERROR: dependencies 'wrspathrow', 'SDMTools', 'spatial.tools' are not available for package 'teamlucc'

I could install them all (except SDMTools) with

devtools::install_github('azvoleff/wrspathrowData')
devtools::install_github('azvoleff/wrspathrow')
devtools::install_github('azvoleff/spatial.tools')

but I could not find (on CRAN or GitHub) an SDMTools version that is suitable for my R version (4.1.0 on Windows 10):

package ‘SDMTools’ is not available for this version of R

So I am afraid I can't help you any further.

You know of course that the teamlucc package is last updated in 2016.
You could ask a question about this in https://github.com/azvoleff/teamlucc/issues but I do not know if the package is still maintained.
And maybe you can find an alternative that is more recent.

Hello,
I was able to get SDMTools using the code

install.packages("remotes")
remotes::install_version("SDMTools", "1.1-221")

As well, I've been emailing teamlucc's maintainer, who I found through the link I posted earlier, so hopefully that also helps.

No big consolation but after installing SDMTools package as you do it I get the same error:

** byte-compile and prepare package for lazy loading
Warning: replacing previous import 'ggplot2::alpha' by 'kernlab::alpha' when loading 'teamlucc'
Warning: replacing previous import 'ggplot2::margin' by 'randomForest::margin' when loading 'teamlucc'
Warning: replacing previous import 'kernlab::rotated' by 'raster::rotated' when loading 'teamlucc'
Warning: replacing previous import 'e1071::interpolate' by 'raster::interpolate' when loading 'teamlucc'
Warning: replacing previous import 'kernlab::buffer' by 'raster::buffer' when loading 'teamlucc'
Error: object 'new_interval' is not exported by 'namespace:lubridate'
Execution halted
ERROR: lazy loading failed for package 'teamlucc'
* removing 'D:/tools/R/Packages/teamlucc'

If you need the package very soon (and the only issue is that new_interval is renamed in interval ) you could clone the package in GitHub and apply the changes to your clone:

  • importFrom(lubridate,new_interval) in NAMESPACE
  • new_interval in auto_cloud_fill.R

But it is always better to keep to the 'official' version.

I hadn't thought of doing that! Right now I'm attempting to run the source code of the functions from the package, but I'll try this right after and update the thread.

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.