Created
December 22, 2013 17:58
-
-
Save rparrish/8086147 to your computer and use it in GitHub Desktop.
This calculated field in Tableau includes a debugging function that outputs the data being sent to and from RServe.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF FIRST() == 0 THEN | |
SCRIPT_REAL(' | |
debug <- TRUE | |
## R Comment | |
results <- mean(.arg1) | |
## Debug output | |
if (debug) { | |
sink("TableauR_debug.txt", append=TRUE) | |
print("######## START ####") | |
print("######## Arithmetic LOS") | |
print(date()) | |
print("incoming from Tableau") | |
print(.arg1) | |
print("back to Tableau") | |
str(results) | |
results | |
print("######## END ####") | |
print("") | |
sink() | |
} | |
results | |
', | |
SUM([LOS]) //.arg1 | |
) | |
END | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment