problem with 'caret' - will not load 'recipes'

Any help would be appreciated for 'caret' issue below. -K1llerFlankerNo7


I have this problem where when I load 'caret' it tries to load the required packages and then fails to load the dependency 'recipes'. I have Rinstalled R( running 3.6.1) and R Studio. I also downloaded RTools. Any have any idea how I can get this done so it works?

I did* try to load the recipes package separately with all dependencies on too.

I get the below:

> library(caret)
Loading required package: lattice
Loading required package: ggplot2
Error: package or namespace load failed for ‘caret’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):

  • there is no package called ‘recipes’*

Do you have tried to install recipes package? If so, Do you get any error message while doing it?

install.packages("recipes", dependencies = TRUE)
package ‘caret’ successfully unpacked and MD5 sums checked
Warning in install.packages :
  problem creating directory \\10.53.2.25\home$\justinfacteau\My Documents\R\R-3.6.1\library\00LOCK\caret: No such file or directory

The downloaded binary packages are in
	C:\Users\justinfacteau\AppData\Local\Temp\RtmpKetNJN\downloaded_packages
installing the source packages ‘recipes’, ‘knitr’

trying URL 'https://cran.rstudio.com/src/contrib/recipes_0.1.7.tar.gz'
Content type 'application/x-gzip' length 989183 bytes (965 KB)
downloaded 965 KB

trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.25.tar.gz'
Content type 'application/x-gzip' length 883483 bytes (862 KB)
downloaded 862 KB

'\\10.53.2.25\home$\justinfacteau\My Documents'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
* installing *source* package 'recipes' ...
** package 'recipes' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in findpack(package, lib.loc) : 
  there is no package called 'recipes'
Calls: <Anonymous> -> findpack
Execution halted
ERROR: lazy loading failed for package 'recipes'
* removing '\\10.53.2.25/home$/justinfacteau/My Documents/R/R-3.6.1/library/recipes'
Warning in install.packages :
  installation of package ‘recipes’ had non-zero exit status
'\\10.53.2.25\home$\justinfacteau\My Documents'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
* installing *source* package 'knitr' ...
** package 'knitr' successfully unpacked and MD5 sums checked
** using staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
Error in findpack(package, lib.loc) : there is no package called 'knitr'
Calls: <Anonymous> -> findpack
Execution halted
ERROR: lazy loading failed for package 'knitr'
* removing '\\10.53.2.25/home$/justinfacteau/My Documents/R/R-3.6.1/library/knitr'
Warning in install.packages :
  installation of package ‘knitr’ had non-zero exit status

Yes look above - I did attempt to install and I get what's above. It's odd. It also notes that lazy loading failed for package 'knitr'

You are installing to a network drive, this usually brings issues while installing packages, I would recommend installing on a local folder instead.

Where do I change that setting in Rstudio?

You can select a different libpath here

Or manually modifying your .libPaths() variable

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