I have some aggregate fields [TL] [TR] [BR] [BL] they all do a distinct count.
When I try to run this code in Tableau
SCRIPT_str(
"
first<-c(.arg2,.arg3);
second<-c(.arg1,.arg4);
r<-data.frame(data.frame(kuta), data.frame(kamina));
e<- paste(chisq.test(r, correct=F)$p.value)
print(e);
",[TL],[TR],[BR],[BL])END
My tableau column chiSQ_working just returns ZERO
If I hard core the parameters I get the same result as above (My tableau just returns ZERO)
However if I hard code values inside of the R script, the tableau script is able to compute the chi sq p value
Then the calculation works, but of course it assigns each row the p value
It seems that Tableau is unable to parse through aggregated numbers to the R script
What is the fix?
Hello Karim
I have moved this thread to the Tableau External Services area of the forums where other users of R venture more often in the forums. This reply will also bring this post to the top of the list. If you have not reviewed the resources for R in this area, then these resources may also be of great assistance.
Regards
Patrick
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.