[R-pkg-devel] how to make "r-release-osx-x86_64-mavericks" machine support rgl 3D plots
Duncan Murdoch
murdoch.duncan at gmail.com
Fri Oct 9 02:30:59 CEST 2015
On 08/10/2015 7:55 PM, Ott Toomet wrote:
> Alternatively, you can exclude selected tests from being included in the
> package. Most of the tests I do are not necessary to run on CRAN, these
> are not system dependent while still time consuming. To run these just
> on my PC in enough. So I use .Rbuildignore to exclude those.
Another way to achieve something similar is to put some tests in another
directory besides "tests" (e.g. inst/slowtests), and use the --test-dir
argument to R CMD check to run those. This way other people can run
your tests if they want to.
Duncan Murdoch
>
> Cheers,
> Ott
>
> On Thu, Oct 8, 2015 at 2:10 PM, Duncan Murdoch <murdoch.duncan at gmail.com
> <mailto:murdoch.duncan at gmail.com>> wrote:
>
> On 08/10/2015 4:41 PM, Dr Gregory Jefferis wrote:
> > Dear Duncan,
> >
> > Could I just revive this one more time
> >
> > On 16 Aug 2015, at 17:21, Duncan Murdoch wrote:
> >
> >> It is harder for you to implement this yourself, because CRAN frowns
> >> on
> >> tests that try to detect whether they're running under CRAN or not.
> >>
> >> You could put in "if (interactive())" checks around your displays. If
> >> you want to check whether the rgl calls are okay, you could do
> >> something
> >> like this:
> >>
> >> library(rgl)
> >> options(rgl.useNULL = TRUE)
> >
> > I have a package which imports rgl i.e. rgl is loaded on package
> > startup. A number of examples (not tests) use rgl features and I do not
> > want these to be run on CRAN.
> >
> > Is there a way to configure rgl.useNULL to handle this situation?
> >
>
> I don't think so, but I don't think you really want that.
>
> options(rgl.useNULL = TRUE)
>
> doesn't stop rgl from running, it just stops it from trying to display
> anything. So you could put code like
>
> if (!interactive())
> options(rgl.useNULL = TRUE)
>
> into your .onLoad function for your package, and it wouldn't try to open
> a display on CRAN, or anywhere else that wasn't interactive.
>
> Duncan
>
> ______________________________________________
> R-package-devel at r-project.org <mailto:R-package-devel at r-project.org>
> mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
>
>
>
> --
> Ott Toomet
>
> Visiting Researcher
> School of Information
> Mary Gates Hall, Suite 310
> University of Washington
> Seattle, WA 98195
>
More information about the R-package-devel
mailing list