R Scripting issues...

Fred12
Fred12 New Altair Community Member
edited November 5 in Community Q&A

hi,

I did a simple R script print("Hello World!") and tried to run it, but I got an error:

 

Oct 2, 2016 9:21:10 AM SEVERE: Process failed: The script could not be parsed.

Oct 2, 2016 9:21:10 AM SEVERE: Here:

Oct 2, 2016 9:21:10 AM SEVERE: Process[1] (Process)

Oct 2, 2016 9:21:10 AM SEVERE: subprocess 'Main Process'

Oct 2, 2016 9:21:10 AM SEVERE: ==> +- Execute R[1] (Execute R)

 

I don't know why, but I have correctly entered the path to the RScript.exe in the Preferences...

 

With the Rscript tutorial, I get the error:

The script could not be parsed. Please check your R Script.

 

 

I dont know whats wrong..?

Tagged:

Answers

  • Thomas_Ott
    Thomas_Ott New Altair Community Member

    The error indicates a problem with your script itself.  Please post your XML process.

  • jojo_abalos
    jojo_abalos New Altair Community Member

    Also having error similar to above:

     

    Oct 25, 2016 10:37:59 AM SEVERE: Process failed: The script could not be parsed.

    Oct 25, 2016 10:37:59 AM SEVERE: Here:

    Oct 25, 2016 10:37:59 AM SEVERE: Process[1] (Process)

    Oct 25, 2016 10:37:59 AM SEVERE: subprocess 'Main Process'

    Oct 25, 2016 10:37:59 AM SEVERE: ==> +- Execute R[1] (Execute R)

     

    I tried using the built-in tutorial process on generating density function using R with the ff sample R script:

     

    rm_main = function()
    {

    x <- seq(from= -5, to= 5, length.out =1000)


    dn <- dnorm(x)
    de <- dexp(x)
    dc <- dcauchy(x)
    dn3 <- dnorm(x, sd=3)

    result <- data.frame(
    id =x,
    StandardNormalDistribution = dn,
    NormalDistribution = dn3,
    ExponentialDistribution =de,
    CauchyDistribution= dc
    )
    return(result)

    }

  • mmichel
    mmichel New Altair Community Member

    The '[..] script could not be parsed.' error will be thrown if the R method which reads the user script failed. You should get a more detailed description about R error by opening the Log Panel. There should be some output in regard to the error directly above the process failed error message.