Fix for gbm.plot

I’m currently in the process of writing a report using boosted regression trees.  I’m currently using guidelines provided by Elith et al [link], where 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.

Which kept giving me this error

Error: could not find function “windows”

The reason is that I am using a mac…which uses X11() instead of windows() – I found this out thanks to this website here:

So I simply found the source code for gbm.plot, and replaced windows(…) with X11(…)

Hopefully this will prove helpful to someone.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s