I'm having trouble running code in "R" with the Alteryx "R tool".
I tested the code in an environment outside of Alteryx and it is working perfectly, but when I test this code inside the tool in Alteryx, it enters an infinite loop and never finishes the workflow.
Some steps:
1 - I tried to install the "benford.analysis" R library directly through Alteryx on the command line and it returns: "package "benford.analysis" is note available for this version of R".
2 - If I run the script without trying to install the library, just calling it from the one already installed on my computer, Alteryx runs in an infinite loop.
I share the code:
"result <- read.Alteryx("#1", mode="data.frame")
install.packages("benford.analysis", repos="https://cran.r-project.org/web/packages/benford.analysis.index.html/")
library(benford.analysis)
bfd.cp <- benford(result$AmountPaid) ##running benford tests on column "AmountPaid" in a variable.
write.Alteryx(bfd.cp, 1)
suspects2 <- getSuspects(bfd.cp, result) ##capturing the suspects.
write.Alteryx(suspects2, 2)
AlteryxProgress(1)
Basically, the code is for the library to analyze some payments and get back to me which payments might be possible fraud.
Hey @marcoscaceres
Is there any reason why you are building the benford analysis in R?
You can re-create this in Alteryx, here is a link that shows you how:
Hey @gautiergodard .
Thanks ur answer.
Yes, I need to use this library because in addition to using the Benford analysis tool, I use other tools made available.