Dear Alteryx-community members,
I created a workflow including the R-tool and installed several packages (see list below) to the library on C:/ProgramData/Alteryx/R-library. To avoid version conflicts, I load all the packages pre-installed from Alteryx via the default path (C:/Program Files/Alteryx/R-3.6.3/library) first and then the packages from the path mentioned above.
However, when I now open the workflow in Alteryx (Version: 2020.4.5.12471) it takes about 3 min till Alteryx responds and an R-window automatically pops up, which can not be closed. Crucially, to this point, I haven't done anything except opening the workflow.
When I click on "Run", the workflow runs until the same thing happens: The same R-window pops up. Closing the R-window causes the workflow to stop with "Error: createReports: The R.exe exit code (3489660927) indicated an error".
Has anyone experienced this or a similar issue and knows how to fix it?
Thank you very much for your help!
Here is the list of R-packages I try to install and load from C:/ProgramData/Alteryx/R-library:
pdftools, dplyr, tidyr, stringr, purrr, readxl, ggplot2, RCurl, htmltools, pagedown, later, websocket, qpdf, rlang, servr.
I'm not sure about that R window popping open and hanging up on you, but when you installed the Alteryx Predictive Package, all R-related "stuff" by default would've gone into C:/Program Files/Alteryx/R-3.6.3 (including the preloaded packages in the \library folder). Any additional packages you install should be installed using an R tool placed on the Alteryx canvas (or the R.exe located in the \bin folder; whichever you prefer). This will install the new packages into the same location as the preinstalled ones (C:/Program Files/Alteryx/R-3.6.3\library).
It sounds like you created your own folder (C:/ProgramData/Alteryx/R-library) which probably messes Alteryx up. If that's the case, I would delete C:/ProgramData/Alteryx/R-library and reinstall your new packages as described above.
Hope this helps!
Thank you very much for your suggestion! I will check it out.
You're welcome; let me know if that does the trick - I'm curious now LOL !
Here a short update:
I deleted the folder C:/ProgramData/Alteryx/R-library and tried to install all packages in the default library (C:/Program Files/Alteryx/R-3.6.3). It turns out that I have no rights to write in this folder (i.e., error message that C:/Program Files/Alteryx/R-3.6.3 is not writable and that therefore no packages can be installed).
Ah yes, good ole' Microsoft not allowing the owners of computers to write to their own C-drive (I think they made that change with Win10, I keep forgetting about that myself!). However you're installing it will have to be opened in admin mode (right click the tool you're using). Personally I open Alteryx Designer in admin mode (right click the icon on your desktop - - yes, this is necessary even if you installed the admin version of Alteryx; again, a dumb windows thing). I drop an R tool down to the canvas and paste my code in there. There are, however, some hiccups from time to time and a package or 2 won't install for whatever reason. Those stragglers I install by doing the right click admin thing on "C:\Program Files\Alteryx\R-[most recent version]\bin\R.exe" and installing from there. That always does the trick for me.
Unfortunately the Alteryx-R "integration" is anything but smooth or straight forward.
Thank you very much for that hint! Unfortunately, I have no admin rights and can thus not open Alteryx in admin mode.
I see. If you have an IT or Security department they should be able to log on to your machine and do it for you then.
I recommend package control in Rstudio to a path which is shared with Alteryx's R environment - @mbarone - you wouldn't recommend that the user add a libpaths() to point to C:/Program Files/Alteryx/R-3.6.3/library as a potential solution?
Also - @sabe can you confirm your packages are set up for 3.63 or lower? Most packages will download to 4.X unless you install a specific package for the older version.
also - the bulk of these packages are natively installed - at least with the most recent version of Alteryx's predictive tools.
My recommendation is based on some conditions.
IF a user is to have the Alteryx Engine (Designer or Server) run R code via dropping an R tool onto an Alteryx Canvas, and entering/pasting line-by-line code right into the R tool on the Alteryx Canvas, or using the "source" command in an R tool onto an Alteryx Canvas to point to a .R script, THEN any additional packages that do not come with Alteryx should be installed in the default Alteryx R directory.
For example, when you install the Alteryx Predictive install, Alteryx will install all pre-packaged libraries to:
If I want to use Alteryx to run R code via dropping an R tool on a canvas like this:
Then I will install additional packages that aren't already in C:\Program Files\Alteryx\R-4.0.5\library like this:
Or if that doesn't work (occasionally it won't for whatever reason), then I go here and run R.exe:
And do the same code as before to install packages.
The bottom line is if you want Alteryx to run R code, via an R tool on the Canvas, then any packages must be installed to C:\Program Files\Alteryx\R-[most recent version]\library.
Hope that explains it better.