1

I am trying to save a trained rlm object [MASS package] inside a R-UDF code using dput(). In the prediction UDF, when i try to read back the object file using dget(), I get a error that a formula object myFormula is not available, although i am creating the object myFormula in the previous line!

R: 3.2.0 Vertica: 7.2.2-2

  • 1
    The help file, `?dput`, says "Deparsing an object is difficult, and not always possible. With the default control, dput() attempts to deparse in a way that is readable, but for more complex or unusual objects (see dump), not likely to be parsed as identical to the original." Maybe an `rlm` object falls into this category. – lmo Dec 09 '16 at 16:34
  • 1
    To get further help, please take a look at these tips on how to produce a [minimum, complete, and verifiable example](http://stackoverflow.com/help/mcve), as well as this post on [creating a great example in R](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). This problem will be difficult to diagnose without a reproducible example. – lmo Dec 09 '16 at 16:37
  • I'm reasonably competent in R but have no idea what a "R-UDF code" might be. If you create the formula outside of the `rlm` call, it may have different environment than if you supply an expression to a regression function. You should post some code (noting that lack of code was cited as a reason for closure by another respondent). I'll hold off on a close vote but if you don't respond in a timely manner, I'll probably travel that route as well. – IRTFM Dec 09 '16 at 20:30
  • Can you share your UDF code or - at least - dput/dget instructions? How many nodes do you have on your system? – mauro Dec 10 '16 at 02:13

0 Answers0