09-12-2016 12:53 PM - edited 08-03-2021 12:59 PM
Can a workflow gather user input row-by-row while processing a dataset? If so, how?
Yes, you can use various GUI packages in R to displaydialogs and gather user input. Among other packages, the gWidgets2 and RGtk2 packages work together nicely to provide the ginput function, which can - all by itself - suffice for displaying the field's original value, and gathering a replacement value. See the attached v10.5 workflow for a very simple example.
Hi John,
I downloaded your loopuserinputwithR workflow. However, I am having issues downloading and installing the RGtk2 package in R tool. I need some guidance about how to download the package in the Alteryx. What is the best way to install and use this package?
Thanks
Hi Mehmet,
I'm not sure why it might pose an issue, other than possibly version, based on a quick Google search which turned up this result: https://stackoverflow.com/questions/44046055/error-in-installing-packages-rgtk2-and-rattle-in-r
Are you experiencing anything similar? Also if you have an IT support group, this is right up their alley to dive in and figure out, (e.g. there may be permissions-related issues that they can work around).
Hope that helps!
John
Thank you John,
It was really helpful.
So, I was able to download the package using a mirror.
install.packages("RGtk2", depen=T, repos="http://cran.us.r-project.org")
I figured that, the problem is loading the the "RGtk2".
Once you run the "library(RGtk2)" to import the package, I get following error.
By the way, it is interesting that, Alteryx support team is having the same issue once they run the code.
Thanks
From the error message, it looks like it also wants GTK+ to be installed. Can you verify that is also installed?