on 09-24-2015 12:21 PM - edited on 07-27-2021 11:46 PM by APIUserOpsDM
Alteryx has a full set of integrated predictive tools but even with developers working at full speed, it is hard to keep up with the R community. Sometimes users want to install and utilize their favorite R packages. Luckily, there is a solution for advanced users. This post will:
Using an Additional R Package:
Can you adapt your code to use the integrated packages? This is the first thing to consider because using the existing packages gives you easier integration with the rest of the workflow and better compatibility. Here’s the list of included packages in Alteryx 10.1: Alteryx R Packages.
If you must use additional R packages, the best approach is to use the analytic app attached below to add the package in your local R library. Please note that there are two limitations here:
If you still would like the package to be part of Alteryx Product, please post this request to the Ideas section of the community or star the post if someone else already asked for it.
Using the R Tool to Add Packages
If you would like to incorporate an additional R package, the Install R Packages analytic app available in the Predictive District does just that:
Simply change the package name to the one you would like to test out. Change the configuration options to suit your requirements, and then click "Finish."
A cautionary note: As of the time of this writing (May 2016, newest version of Designer is 10.5), it's important to ensure that you only install packages that do not come with the Alteryx Predictive tools installation. You may end up installing a different version of a package that is used with the Predictive tools, and the conflicting versions can cause errors in these tools. We are currently working on an improvement that will solve this problem. The improvement should be available with the 10.6 Predictive release.
Use Case Example: Time Series Clustering
Alteryx implements many clustering algorithms. But what if the data you would like to cluster is a time series? For example, customer sales histories? Or sales histories at different locations? In this example we have booking data from different years. We would like to group the years based on two characteristics of the time series:
We will accomplish this using the TSclust package, whose documentation is available online. The attached workflow demonstrates the process, with the following results:
For this data set, the grouping was mostly a function of magnitude, because most of the years had similar temporal patterns.
Acknowledgments:
Check out the original discussion page (and authors who contributed R code!):
To further clarify when it is necessary to reach out to Client Services (Option 1) vs using the boilerplate code (Option 2). The original context of the article was for users creating apps to be posted on the Alteryx Gallery. For users who are working in Alteryx Designer, Option 2 is considered best practice.
Hi,
No matter which package I try to get with this method, I'm receiving "Error: R (8): Error in available[p1, dependencies, drop = FALSE] : "
Even with the sample workflow attached to the post.
Can you point me in the right direction to make this work?
Thanks a lot
PS: I'm using V10.5 w/3.2.3 X64
I cannot access the tools referenced by the section entitled "Using the R Tool to Add Packages" in this post. They are not in a public place. Can they be moved (or copied) to a public location?
Hi @suzb
Which tools you are unable to access?
If they are related to gallery.alteryx.com, apparently they changed locations.
Just login into Alteryx Gallery and search them or browse the Predictive District (https://gallery.alteryx.com/#!districts/56327e37aa690a17f0760bdc)
I'll let Alteryx's people to fix the links.
Thanks for poiting this out.
Best
@AguisandeThanks! I have found that, when trying to use the package installer (after having found the Predictive District 😉 ) I have an R package dll issue. So I've contacted my sys admin support, per some advice I saw on this site.
Anytime!
Glad you fix it!