CrediblyCurious

Nick Tierney's (mostly) rstats blog

Fix for gbm.plot

Categories: rstats

They provide the function gbm.step, which performs 10-fold cross validation on the boosted regression tree. It also has a nifty gbm.plot function, producing partial dependence plots. Unforunately, it kept giving me this error:
Error: could not find function "windows"
This means that the function windows() is being called inside gbm.plot(). So I looked into what the heck windows is and it turns out it opens a graphics device, but is the command reserved for windows machines - I use a mac, and the equivalent command is X11(). I found this out thanks to this website.
So I simply found the source code for gbm.plot, and replaced windows() with X11()