[Rd] Rscript Bug Report (improper parsing of [args])

2017-10-20 Thread Trevor Davis
Hi, A user of my `optparse` package discovered a bug in Rscript's parsing of [args]. (https://github.com/trevorld/optparse/issues/24) I've reproduced the bug on my machine including compiling and checking the development version of R. I couldn't find a mention of it in the Bug Tracker or New Fea

[Rd] proposal: 'dev.capabilities()' can also query Unicode capabilities of current graphics device

2023-08-31 Thread Trevor Davis
Hi, It would be nice if `grDevices::dev.capabilities()` could also be used to query whether the current graphics device supports Unicode. In such a case I'd expect it to return `FALSE` if `pdf()` is the current graphics device and something else for the Cairo or Quartz devices. Thanks, Trevor

[Rd] List's `[[` method with "" tag

2023-09-11 Thread Trevor Davis
Hi, I notice that one can assign a variable to an R list by using an empty string key but one cannot get that variable back from the list by using the empty string key: ```r l <- list() l[[""]] <- "An empty string as list key" names(l) l[[""]] # Returns a `NULL` l[[names(l) == ""]] # Returns firs

Re: [Rd] proposal: 'dev.capabilities()' can also query Unicode capabilities of current graphics device

2023-09-20 Thread Trevor Davis
use case for such a new feature. However, a new feature like `dev.capabilities()$unicode` could certainly return something more sophisticated than a crude `TRUE` and `FALSE` to distinguish between levels of Unicode support provided by different graphics devices. Thanks, Trevor On Wed, Sep 20

Re: [Rd] Problems caused by dev.off() behaviour

2023-10-02 Thread Trevor Davis
> Use it just like dev.off(), but it *will* restore the previous device. I'm observing that if there were no previously open graphics devices then your `safe.dev.off()` opens up a new graphics device which may be an undesired side effect (because "surprisingly" `dev.set()` on the null graphics dev

Re: [Rd] Problems caused by dev.off() behaviour

2023-10-02 Thread Trevor Davis
e are no > devices? That's what I'm seeing on MacOS. > > Duncan Murdoch > > On 02/10/2023 4:21 p.m., Trevor Davis wrote: > > > Use it just like dev.off(), but it *will* restore the previous device. > > > > I'm observing that if there were no previou

Re: [Rd] Vignettes with long compute time

2024-03-11 Thread Trevor Davis
> Is there a way to include the compiled version of a vignette in the doc directory but mark it to NOT be rerun by CRAN? Some developers "precompute" their vignettes so CRAN has nothing left to run: https://ropensci.org/blog/2019/12/08/precompute-vignettes/ > Beth Atkinson and I are splitting out

Re: [Rd] paths capability FALSE on devel?

2024-03-27 Thread Trevor Davis
In the past I've observed similar behaviour with R compiled with support for cairo but no pango: https://stat.ethz.ch/pipermail/r-devel/2022-April/081587.html Despite cairo support if no pango then the documentation in ?X11 says R defaults to type "Xlib" instead of type "cairo" even though both s

Re: [Rd] legitimate use of :::

2013-08-26 Thread Trevor Davis
> This is a good solution. Do I need to specify the original License etc? And > what about a helper function such as stats:::n.knots? This will not appear > in the manual of my package. Is it sufficient in this case to document the > authorship in the source (and perhaps a README as you suggested)?

Re: [Rd] legitimate use of :::

2014-05-13 Thread Trevor Davis
On Tue, May 13, 2014 at 9:14 AM, Knut Krueger wrote: > Is there another new solution for this issue? > especially I would like to use: > > utils:::.win32consoleCompletion > the use of this is suggested in the completion.r file of utils: > Besides forking the function (i.e. "copy-and-paste" it) if

Re: [Rd] inconsolata font for building vignettes with R-devel

2012-02-10 Thread Trevor Davis
> So is there a safe fallback or not?  Should I install texlive-fonts-extra too > when building? > > Dirk > Today I needed to run sudo apt-get install texlive-fonts-extra in order to build a package in R 2.14.1 Ubuntu 11.10 Else I get the following warning/error: * checking PDF version of manu

Re: [Rd] FR: improve "use" function

2025-05-23 Thread Trevor Davis
> Of course, it would be preferable if didn't need to detach the namespace. Here's a version only detaches the namespace when necessary: ```r use <- function(package, include.only) { package <- as.character(package)[[1L]] if (!requireNamespace(package, quietly = TRUE)) { warning("