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 Server Discussions

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

Installing R packages on the Alteryx Gallery

ospinett
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.
6 REPLIES 6
BenMoss
ACE Emeritus
ACE Emeritus

Are you talking about the Alteryx public gallery?

 

https://gallery.alteryx.com/#!

 

 

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. 

 

Ben

ospinett
6 - Meteoroid

Hi Ben,

 

Thanks for your help!! I just have read this article https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Analytics-Gallery-Prohibited-Apps/ta-p/1274

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.

 

 

ospinett
6 - Meteoroid

I'm working on my private gallery

DanielArenas
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. 

chrisha
11 - Bolide

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"] <- "https://cran.rstudio.com"
options(repos = altx.repo)

# Check if package is already installed, if not install it
if("relaimpo" %in% rownames(installed.packages()) == FALSE) {
	install.packages("relaimpo")
}
library("relaimpo")
RajeevPandey
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./