cbarbu/R-package-zoom — pull request #1 by sgibb (2013-09-02 19:04:47+00:00)
Title: add/fix windows() support

Dear Corentin,

I test your package on Windows (I don't use Windows but most of my users do) and recognize that it wasn't working in RStudio (which most Windows users use). RStudio has a graphic devices that isn't supported by `setGraphicsEventHandler`. That's why we need to open an extra `windows()` device. I replaced your `XlibReplot` function with `replot` that will handle windows/unix correctly (I hope so).
I choose to use `do.call("X11")`/`do.call("windows")` to circumvent the following NOTE on CRAN:
> Found an obsolete/platform-specific call in the following function:
‘XlibReplot’
Found the platform-specific device:
‘X11’
dev.new() is the preferred way to open a new device, in the unlikely

Also I replaced your `class(...) == "try-error"` calls by `isError`.

Sorry for my different coding style. Initially I wanted to use your coding style but I could find out what your style was :stuck_out_tongue_winking_eye:

Best wishes,

Sebastian