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

Alteryx does NOT support R Packages - Help

Georgios_Orfanos
6 - Meteoroid

Hello,

I would like to ask a question regarding the combination of Alteryx and R (please, note that I am new to Alteryx).

 

I want to import data from a database and use my R code inside Alteryx. However, I want to use a lot of R packages, such as "tidyverse" or "lubridate", but I always get an error. I tried to install the packages inside the Alteryx folder (inside the corresponding R folder of course), but I still get an error. I also used an Alteryx package called "Install-R-packages", but I received the same errors again.

Do you have any insights regarding this problem?


Feel free to inform me with all the necessary details.
Thank you in advance and I am looking forward to your reply!

 

-George

4 REPLIES 4
RolandSchubert
16 - Nebula
16 - Nebula

Hi @Georgios_Orfanos ,

 

could you provide a bit more detail? What kind of error did you get? A reason could be, that packages your new packages depend on are not available (at least not in the right version) - this could be solved by including all dependencies in installation.

 

Best,

 

Roland

mbarone
16 - Nebula
16 - Nebula

Hi @Georgios_Orfanos , for what it's worth, I often have trouble using that Install-R-packages.  So instead I have 2 ways.  The first way is because I always keep a list of packages that I require, that are NOT in the Alteryx library.  Whenever I install a new version of Alteryx, I have a module that checks this list against the Alteryx library.  Sometimes Alteryx will add a package that I need, but most times not.  So my module then produces the code for the Alteryx R-Tool to install any additional packages I need.

 

The code looks like this (It goes right in an Alteryx R-tool):

 

.libPaths("C:/Program Files/Alteryx/[R_Library_Path]/library")

install.packages("tidyverse", repos = NULL, type="source")'

install.packages("lubridate", repos = NULL, type="source")'

.

.

.

etc.

 

 

 

Now, in order for this to work, I actually have to open Alteryx in Admin mode (even though the Admin version is the one I'm using) by right clicking the icon on the desktop and choosing "run as admin".


Still, sometimes, for reasons unknown to me, even this doesn't work for some packages.  So then I do my next step.  In "C:\Program Files\Alteryx\[R-version]\bin" there's an R.exe.  I right click and open that in admin mode, and from there I'll do:

install.packages("tidyverse") and hit enter.  A pop-up for the various mirrors will pop up and I just pick one (I usually use the Iowa one for no other reason than I like Iowa LOL).  And then that does the trick.

 

Sorry there's no easy way that I've found as of yet.

 

Georgios_Orfanos
6 - Meteoroid

Indeed, by clicking the R.exe inside Alteryx folder, it is possible to install any (almost) package. 

Thank you so much for your help!!!

mbarone
16 - Nebula
16 - Nebula

Very welcome!

Labels