Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Alteryx R Tool is not Producing ggplot graphs with facets




I am trying to use the R Tool within Alteryx to reproduce a proof of concept I built using RStudio. The visual is a bar chart that has a facet_grid applied to compare across a dimension. An example using the mpg dataset in R would be:


     p <- ggplot(mpg, aes(displ)) + geom_bar() + facet_grid(cols = vars(class))



When I produce the bar chart without the facet I get identical results using both RStudio and the R Tool, but when I apply the facet_grid I get the following error message in Alteryx:

     Error: R (3): Error in facet_grid(cols = vars(class)) :
     Error: R (3): Execution halted
     Error: R (3): The R.exe exit code (1) indicated an error.


Is there a way to get Alteryx's output from the R Tool to display a faceted visual?


Thank you,




I was able to execute your workflow successfully in my Alteryx environment. What version of Alteryx are you using? Can you show the entire log for the workflow execution, not just the errors shown when clicking on the R tool?


See my successful run attached


I am using Alteryx version


I have attached the entire log from the execution.




You may be using different versions of ggplot2 in Alteryx Designer vs Rstudio, which could be causing the problem.


You can check this with the following code:




I am using ggplot2_3.1.0 in both Rstudio and Alteryx Designer version 2014.4.4.54346


If your R environment in Alteryx Designer is on an old version of ggplot2, I would try updating the package and try the code again. You can update the package with the following code. Depending on permissions, you may need to run Alteryx as administrator:


install.packages("ggplot2", repos = "")


I appears I am using ggplot2_3.0.0.


In my situation, the management of packages/libraries is handled by another body, so I will not be able to check if this resolve the situation immediately. I will contact them with your recommendations and go through the process of testing with them, and I'll report back whether the recommendation worked.


Thank you for your prompt replies.