1

I'm trying to build an rjungle model based on an example, but I'm getting an error when I try to use the model for a prediction.

Here is where I got the package:

Install code:

library(devtools)
install_github("Rjungle", username = "jkruppa")

Here's my code to try and run it against iris data:

#get data
data(iris)

#prove data is in workspace
plot(iris)

#try to make jungle (warning comes from this, but not error)
est <- rjungle(depVarName = "Species", 
               data=iris,
               ntree=200,verbose = T)

#something comes out
summary(est)

mypred <- predict(object = est,data = iris) # ERROR is here

What I got:

Though it is very simple code, it should work according to the help doc. Instead I get this, which I don't know how to understand.

Warning message:
running command 'C:/Program Files/Microsoft/MRO-3.3.2/library/Rjungle/exec/rjungle -f C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc072c842f1 -D Species -y 1 -o C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc0283e422a -t 200 -m 0 -z 123 -i 1 -U 0 -u  -w2  -v ' had status 127 

There is something in "est" so I try to "predict" using it, and get the following error:

Error in file(file, "r") : cannot open the connection
In addition: Warning messages:
1: running command 'C:/Program Files/Microsoft/MRO-3.3.2/library/Rjungle/exec/rjungle -f C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc01bc674e5 -D Species -y 1 -o C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc018645dc2 -t 200 -m 0 -z 123 -i 1 -U 0 -u  -w2  -v ' had status 127 
2: running command 'C:/Program Files/Microsoft/MRO-3.3.2/library/Rjungle/exec/rjungle -f C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc02b6e396e -D Species -y 1 -o C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc0529c3e47 -P C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc018645dc2.jungle.xml -v' had status 127 
3: In file.show(paste(rjPred@tmpFile, ".confusion", sep = ""), pager = "cat") :
  file.show(): file 'C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc0529c3e47.confusion' does not exist
4: In file(file, "r") :
  cannot open file 'C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc0529c3e47.prediction': No such file or directory 
Darren Cook
  • 27,837
  • 13
  • 117
  • 217
EngrStudent
  • 1,924
  • 31
  • 46
  • You're getting downvoted because 1) This is a discussion question. SO is for specific programming questions. [source](http://stackoverflow.com/help/dont-ask) [source](http://stackoverflow.com/help/on-topic). 2) You're asking a lot of questions, it makes it seem like you haven't done research. I'm not saying that you haven't researched, but typically when someone asks a lot of questions like this, they're not really sure what they're asking. A forum like [reddit](https://www.reddit.com/r/Rlanguage/) could perhaps be a better place for discussions. – Travis Heeter Dec 16 '16 at 15:35
  • @TravisHeeter - references are because I did the work, not because I didn't. Discussion asks for opinions, I am asking for facts. I also supplied "what I tried" and "the error output". I will check out your links. – EngrStudent Dec 16 '16 at 15:37
  • 1
    I didn't downvote your post, I'm just letting you know why it happened. This is something a lot of people do when they first start on SO. I did it to. If you ask a question with a big wall of text no one's going to take the time to read the whole thing. You have to be more specific. Break up your giant question into smaller, more specific questions. Like if you want this question to actually get answered, take out that whole first part telling the entire story behind where you're at. Just have the programming question. – Travis Heeter Dec 16 '16 at 15:39
  • Much Better! OK, I searched Google for `had status 127` and found this: http://stackoverflow.com/questions/29129681/create-zip-file-error-running-command-had-status-127. Although, you're using [MRO](https://www.r-bloggers.com/a-data-scientists-perspective-on-microsoft-r/) which I don't have experience with. – Travis Heeter Dec 16 '16 at 15:50
  • 1
    Is it possible you haven't installed the necessary library, or installed them to a folder that r doesn't know about or doesn't have access to? It looks like it's looking for files, but can't open a connection to them. – Travis Heeter Dec 16 '16 at 15:59
  • @TravisHeeter - most R should install with the single install. This is the first time in several years of using it that I had to do something other than type "install('')" without the help docs fully covering that. The 'h2o' library requires java, and xgboost requires its library. Outside of that, nothing immediately comes to mind. – EngrStudent Dec 16 '16 at 16:18
  • @TravisHeeter The "status 127" is related, I think, to the warning not the error. I installed Rtools, restarted R and nothing improved. I suspect lines 3 and 4 about "file" are the problem. It may want me to working directories, model files, or such. Thanks anyway. – EngrStudent Dec 16 '16 at 16:24
  • This has nothing to do with Microsoft R. – Hong Ooi Dec 17 '16 at 12:22
  • 1
    Also, post where you got the package from. – Hong Ooi Dec 17 '16 at 12:23
  • @Hong Ooi - I agree with you. Revolution Analytics R or Microsoft Open R should have the same or quite likely less issues than other versions of R. – EngrStudent Dec 17 '16 at 12:29

0 Answers0