$ 0 0 you need to let the engine know you are intending to use the stats library. add : rengine.Evaluate("library(stats)"); prior to STDResult.