Now that it's live, don't forget to accept your certification badge on Credly today! Learn more here.
We are currently experiencing an issue with Email verification at this time and working towards a solution. Should you encounter this issue, please click on the "Send Verification Button" a second time and the request should go through. If the issue still persists for you, please email for assistance.

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Unable to load caret package using R developer tool

7 - Meteor

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?


6 - Meteoroid



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='')



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.

7 - Meteor

Thank you Ayelavan. 


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


Thank you

5 - Atom














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




Alteryx Alumni (Retired)

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 (!app/Install-R-Packages/57bb2a58a248970b4472c2e6) to solve your problem.


More details could are available there:




Paul Noirel

Sr Customer Support Engineer, Alteryx