Jump to content

Convert Python script to R-script


Kumud K

Recommended Posts

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

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

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

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

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. 

 

  • Like 2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...