2 Replies Latest reply on Apr 8, 2013 5:33 PM by Arif Iqbal-Oracle

    Question related to  performing  R computation in  database

    Arif Iqbal-Oracle
      I am trying an example something similar to the one mention in the following document

      However, for me its always failing... Just wanted to check with if you were able to execute a embedded R computation e.g doEval which involved pulling a db table into a data frame ... I tried the following

      ore.create(iris,  table = "IRISEMBED")
      head(IRISEMBED)   //works fine

      +//following command errors out+
      newmod <- ore.doEval(
      +function() {+
      ore.sync(table=c("IRISEMBED"))     //also tried  ore.sync()
      dat <- ore.pull(IRISEMBED)
      newmod  <-  lm(Sepal.Length ~ Sepal.Width Petal.Length, dat)+
      }, ore.connect=TRUE);

      Error in .oci.GetQuery(conn, statement, data = data, prefetch = prefetch,  :
      ORA-20000: RQuery error
      Error in ore.pull(IRISEMBED) :
      error in evaluating the argument 'x' in selecting a method for function 'ore.pull': Error: object 'IRISEMBED' not found

      ORA-06512: at "RQSYS.RQEVALIMPL", line 104
      ORA-06512: at "RQSYS.RQEVALIMPL", line 101

      However , if try to execute the above steps one by one directly from R shell, it works fine... I am facing this issue only when try to pull a table as part of doEval function. Also, I get the same error from SQL also when I try to execute any R function which involves pulling a table into a data frame ... Any idea about this issue ?