Kumud K Posted August 2 Share Posted August 2 I'm using this Pyhton code for creating data function : try: if len(b)>0: a=b else: a="NA" except: a="NA" where b is input and a is output. I want to convert the above logic to R-script and that should work as the above code is working. Thanks in Advance! Link to comment Share on other sites More sharing options...
David Boot-Olazabal Posted August 2 Share Posted August 2 Hi Kumud, Using an online converter (https://www.codeconvert.ai/python-to-r-converter), this is what I get: tryCatch({ if (length(b) > 0) { a <- b } else { a <- NA } }, error = function(e) { a <- NA }) You would have to check this in your dxp file, if the R code does the same. Kind regards, David Link to comment Share on other sites More sharing options...
Kumud K Posted August 5 Author Share Posted August 5 Thank you David for the suggestion. I missed one point here: I used the python code for data function because further I was passing the input as a concatenated value (in expression) and then splitting the value using iron python and assigning to respective document property but with the help of R script is that possible? I referred this youTube video : https://www.youtube.com/watch?v=ufc5qWUneE8 Here it say that we can use either R or python datafunction but I'm getting error while switching the code from python to R ( error: invalid function passed) Thanks in Advance! Link to comment Share on other sites More sharing options...
Kumud K Posted August 5 Author Share Posted August 5 The error notification: ( error: invalid property value An invalid property value was returned from the server and ignored ) the problem with python code is the existing Dashboard isn't get cached and it's not working in webplayer. Support team said that it's TIBCO issue that's the reason I wanted to change from python to R but R-script is not working in Dashboard. Link to comment Share on other sites More sharing options...
Kumud K Posted August 7 Author Share Posted August 7 Hello Team, I'm looking solution for the above please help me out. The Dashboard is stuck in cache and in webplayer Dashboard does not show result. How to fix this? Support team said that this is because of the Python data function present in dashboard Thanks in Advance. Link to comment Share on other sites More sharing options...
Olivier Keugue Tadaa Posted August 7 Share Posted August 7 Hi Kumud, To Execute a data function on the Web Player you need to install the corresponding engine on (at least) one of the node managers. This is valid for Python, R, or TERR. If your initial Python code is working on the Analyst you should deploy the Python service on your Node Manager. Even if you make it work with R you will still have the same issue on the Web Player unless you have deployed an R-Service. I encourage you to continue speaking with the support to find a suitable solution since they know your environment. 2 Link to comment Share on other sites More sharing options...
Kumud K Posted August 7 Author Share Posted August 7 but everything were working fine couple of months back, it's new issue support team said that it's a (issue from Spotfire side itself) Link to comment Share on other sites More sharing options...
Olivier Keugue Tadaa Posted August 8 Share Posted August 8 Please let us know the status and the ticket number (in my inbox). We need to have all the background from the support. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now