Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Error when trying to use the R tool - unable to load Rcpp

sjanmohamed
5 - Atom

Hello,

 

I am having some difficulty running R scripts through Alteryx.  I setup a very simple flow and tried to run the code but received the following error:

 

R (9) Error: Unable to load the Rcpp package - Use the R installer provided by Alteryx
R (9) Execution halted
R (9) The R.exe exit code (1) indicated an error.

 

Rcpp is already loaded in C:\Program Files\Alteryx\R-3.4.4\library, so:

 

1. How do I ensure Alteryx is looking in the above directory for packages?

2. What do I need to do to resolve this issue with Rcpp, (does this package need to be called each time through library(Rcpp)?

 

RTest.png

 

I have R version 3.5 installed on my machine; this is what I use normally through RStudio - could this be causing a problem.

 

Thank you in advance for your help - I have been struggling to find a solution all day and can't figure it out.

7 REPLIES 7
BenMoss
ACE Emeritus
ACE Emeritus
Alteryx references the library you have outlined by default.

As for a solution to your problem.there are several posts on the community outlining the same problem as yourself, give the community a search and see if any of the posts help you come to a solution, if not then we can try and guide you and offer different solutions to those outlined in the posts.

Ben
sjanmohamed
5 - Atom

Thanks @BenMoss,

 

I have taken a look at the other posts and wasn't able to find a solution. I followed a guideline which documented the removal of the predictive tools and then reinstall, and have made sure I am using both Admin version of Alteryx Designer as well as Predictive Tools. I still continue to get the same error message. Any further suggestions you have would be very much appreciated. I am working on a project which will require some segmentation analysis and can't get to that until I have R working properly within Alteryx.

 

Thank you for your help!

BenMoss
ACE Emeritus
ACE Emeritus

Could you try the following.

 

Delete the Rcpp package from C:\Program Files\Alteryx\R-3.4.4\library

 

Then go to... C:\Program Files\Alteryx\R-3.4.4\bin and right click on 'R.exe' and hit 'Run as administrator'. 

 

This will bring up the R terminal.

 

Then do install.packages("Rcpp")

 

It will prompt you to select a mirror, just select the one closest to you and check the messages that it appears to have run fine, then close it.

 

Then try again with library(Rcpp) in the R tool.

 

Ben

sjanmohamed
5 - Atom

Hi @BenMoss

 

Thank you for your reply - I'm not sure if my previous message got posted, it appeared to be delivered and then disappeared...

 

I followed your steps and removed the Rcpp package from the Alteryx library, ran the R.exe as admin and installed the Rcpp package through there. It ended up installing to C:/Users/OWNER/Documents/R/win-library/3.4.

 

I then went back to Alteryx, ran the R Installer app and loaded the Rcpp package from there as well - which also seemed to install correctly. R is now working in Alteryx - but to be honest I'm not sure how as I don't see the Rcpp package in the Alteryx library folder, even after installing it both through R.exe and the R installer app. When I run .libpaths() I do see both directories in question, so I assume everything was installed correctly. Do you know what the two paths below represent?

 

.libPaths()
[1] "C:/Users/OWNER/Documents/R/win-library/3.4"
[2] "C:/Program Files/Alteryx/R-3.4.4/library"

 

Thank you for your help Ben, very much appreciate it!

nitinpatkar1984
7 - Meteor

Great. Thanks for sharing

nitinpatkar1984
7 - Meteor

Great. Thanks

Binocularity
5 - Atom

This worked for me too - but no idea why - it seemed to install Rcpp in a different R location altogether.

Labels