community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE

Unable to load caret package using R developer tool

I am using Alteryx 2018.2. I already installed the caret package in the appropriate library. However, when I run the my workflow and try to load the caret package using the R tool, I obtain the following message:

 

Error: R (27): Error: package or namespace load failed for 'caret' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):

 

I am able to load other packages, does anyone know what the issue might be?

 

Alteryx Certified Partner

@cesar_castellon 

 

How did you install the caret package? 

 

I suggest you use the R-Tool within alteryx to install the package along with dependencies before loading the library as below:

 

install.packages('caret', repos='http://cran.us.r-project.org')
library("caret")

Capture.PNG

 

Note: it is important for you to specify a repository when installing packages as the popup which appears asking you to specify the mirror in most R GUI's will not appear when using the Alteryx R Tool.

Thank you Ayelavan. 

 

I actually realized the problem from looking at the error statement - I was missing another package needed for caret. 

 

Thank you

Atom

image.png

 

 

 

 

 

 

 

 

 

 

 

 

I received the above error, when I tried to run this code is the R tool. Could this be because I need admin rights? 

 

Thanks

Cait

Moderator
Moderator

Hi @cebiddle,

 

Hopefully, you have now received an answer to your question.

 

By default (aka if parameter lib is unspecified), install.packages() tries to install new packages under current R directory (so C:\Program Files\R-3.4.4/library in your case). As you are probably not running Alteryx Designer as Administrator, it fails as it can't create files and folders.

 

I would suggest to use Gallery's app Install R Packages (https://gallery.alteryx.com/#!app/Install-R-Packages/57bb2a58a248970b4472c2e6) to solve your problem.

 

More details could are available there: https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Install-R-Packages/ta-p/41265

 

Thanks,

 

Paul Noirel

Sr Customer Support Engineer, Alteryx

Labels