0

I'm trying to install the "anomalize" package in R version 4.2.2. I'm using a university device, and it takes a while for IT to respond, so I can't update my RStudio. I need to run some time series anomaly analysis.

I have tried installing with the "groundhog package", which worked for "timetk package" but has failed to run for "anomalize".

install.packages("groundhog")
library("groundhog")
groundhog.library("anomalize", "2023-02-20", tolerate.R.version='4.2.2') # version: 0.2.3
# also tried version 0.2.2 released "2020-10-09"

I got the error below:

    > groundhog.library("anomalize", "2023-02-09", tolerate.R.version='4.2.2')

groundhog says: will now look for 1 binary packages in MRAN (a Microsoft archive of CRAN).
MRAN is slower than CRAN, but faster than installing from source.
groundhog says: did not find any packages in MRAN

Will now attempt installing 2 packages from source.


groundhog says: Installing 'future_1.31.0', package #1 (from source) out of 2 needed
> As of 09:05, the best guess is that all 2 packages will install around 09:07, most likely before 09:10.

trying URL 'https://cran.rstudio.com//src/contrib/Archive/future/future_1.31.0.tar.gz'
Content type 'application/x-gzip' length 335575 bytes (327 KB)
downloaded 327 KB

Will try again, now showing all installation output.
trying URL 'https://cran.rstudio.com//src/contrib/Archive/future/future_1.31.0.tar.gz'
Content type 'application/x-gzip' length 335575 bytes (327 KB)
downloaded 327 KB

* installing *source* package 'future' ...
** package 'future' successfully unpacked and MD5 sums checked
staged installation is only possible with locking
** using non-staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace 'globals' 0.14.0 is being loaded, but >= 0.16.1 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'future'
* removing 'C:/Users/saa815/Documents/R_groundhog/groundhog_library/R-4.2/future_1.31.0/future'
The package 'future_1.31.0' failed to install!



----------------   The package anomalize_0.2.2 did NOT install.  Read above for details  -----------------

Warning message:
In utils::install.packages(url, repos = NULL, lib = snowball$installation.path[k],  :
  installation of package ‘C:/Users/saa815/AppData/Local/Temp/RtmpcV6w0o/downloaded_packages/future_1.31.0.tar.gz’ had non-zero exit status

Then I decided to try this:

devtools::install_github("business-science/anomalize")

And got another error:

> devtools::install_github("business-science/anomalize")
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called ‘htmlwidgets’

Because it specifies the required packages in the error message, I've tried to install them one after the other but that is taking very long.

halfer
  • 19,824
  • 17
  • 99
  • 186
Geo_CJ
  • 29
  • 6
  • may you can make conda environment and do the installation but there you won't have R studio you will have to work with jupyter notebook – PesKchan Apr 08 '23 at 08:41
  • Check here: https://stackoverflow.com/questions/17082341/installing-older-version-of-r-package – Mar Apr 09 '23 at 04:59
  • And this is the last version of the package: https://cran.r-project.org/src/contrib/Archive/anomalize/anomalize_0.2.3.tar.gz – Mar Apr 09 '23 at 05:00
  • Hi Geo_CJ, did you manage to install the package? I have the same problem ... any hekp would be much appreciated. Thanks! – TiF Jun 22 '23 at 10:50

0 Answers0