ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now
2 Day Countdown - The Alteryx Community will be temporarily unavailable for a few hours due to scheduled maintenance starting on Thursday, April 22nd at 5pm MDT. Please plan accordingly.

Alteryx Server Discussions

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

Installing R packages on the Alteryx Gallery

6 - Meteoroid
I'm writing you to ask for your help!!
Is there a way to install R libraries in the gallery? I had created a workflow where I use the library "relaimpo" and it works fine in my desk, but when I try to run this workflow in the gallery I get an error.
I also have installed the R package in my Alteryx Server (works fine), but in the gallery doesn't work.
17 - Castor
17 - Castor

Are you talking about the Alteryx public gallery?!



The R tool and download tools are prohibited tools in the public Alteryx Gallery. My understanding of the reason for this is to prevent harmful scripts from being executed on the server machine. 



6 - Meteoroid

Hi Ben,


Thanks for your help!! I just have read this article

and I will give it a try with this posible solution. 


My problem is that I need to get the variable importance from an output of a linear regresion and I'm using a function of the relaimpo library from R.



6 - Meteoroid

I'm working on my private gallery

7 - Meteor

On private gallery:


First run an R box using the command .libPaths(), this will output the paths where Alteryx searchs for the R packages.


Then install the package using one of the routes in the command output.


Note: If there is still an error after this, go to the install route, then to the package recently installed, and open NAMESPACE file, after this, check that all the packages imported by the NAMESPACE file are installed, if any of them isn't, install using the same directory you used for the first package install.


Also note that, the App must be running on unrestricted mode in the gallery. 

10 - Fireball

You can also install R packages directly from your R script. For example, for my R tool using the relaimpo package too, I have this in the beginning:


altx.repo <- getOption("repos")
altx.repo["CRAN"] <- ""
options(repos = altx.repo)

# Check if package is already installed, if not install it
if("relaimpo" %in% rownames(installed.packages()) == FALSE) {
5 - Atom

Hi , I am trying the below method but its not working at all. I am trying to installcirclepackeR library . can you help me resolve the issue./