[Rd] Minor typo in R-exts

2019-07-22 Thread Josh O'Brien
Section 1.1.3 of the "R-exts" manual currently refers to "imports or importFrom directives" where it means to say "import or importFrom directives". Results of a diff between R-exts.texi at SVN revision 76864 and a corrected version are copied below. *** R-exts.texi Mon Jul 22 14:41:19 2019 ---

[Rd] For integer vectors, `as(x, "numeric")` has no effect.

2015-12-04 Thread Josh O'Brien
Here's the surprising behavior: x <- 1L xx <- as(x, "numeric") class(xx) ## [1] "integer" It occurs because the call to `as(x, "numeric")` dispatches the coerce S4 method for the signature `c("integer", "numeric")`, whose body is copied in below. function (from, to = "numeric", s

Re: [Rd] For integer vectors, `as(x, "numeric")` has no effect.

2016-01-04 Thread Josh O'Brien
On Dec 19, 2015, at 3:32 AM, Martin Maechler wrote: >> Martin Maechler >>on Sat, 12 Dec 2015 10:32:51 +0100 writes: > >> John Chambers >>on Fri, 11 Dec 2015 10:11:05 -0800 writes: > >>> Somehow, the most obvious fixes are always back-incompatible these days. >>> The exam

Re: [Rd] For integer vectors, `as(x, "numeric")` has no effect.

2016-01-05 Thread Josh O'Brien
On Tue, Jan 5, 2016 at 1:31 AM, Martin Maechler wrote: >>>>>> Josh O'Brien >>>>>> on Mon, 4 Jan 2016 16:16:51 -0800 writes: > > > On Dec 19, 2015, at 3:32 AM, Martin Maechler stat.math.ethz.ch> wrote: > > >>>&g

[Rd] In R for Windows RGui, plain text help files open up at bottom of help file

2016-05-05 Thread Josh O'Brien
hods base loaded via a namespace (and not attached): [1] tools_3.3.0 Cheers, Josh O'Brien __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Can R for Windows be built outside of the top-level source directory?

2015-02-20 Thread Josh O'Brien
The "R-admin" manual describes how to build R from outside of the top-level source directory on a *NIX machine (http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Simple-compilation), but it makes no analagous mention of a way to do so under Windows. Since the build process in Windows is

[Rd] How best to get around shadowing of executables by system()'s prepending of directories to Windows' PATH?

2015-05-18 Thread Josh O'Brien
My question: On Windows, R's system() command prepends several directories to those in the Windows Path variable. >From ?system The search path for 'command' may be system-dependent: it will include the R 'bin' directory, the working directory and the Windows system directories be

Re: [Rd] How best to get around shadowing of executables by system()'s prepending of directories to Windows' PATH?

2015-05-19 Thread Josh O'Brien
On Mon, May 18, 2015 at 10:29 AM, Josh O'Brien wrote: > My question: > > On Windows, R's system() command prepends several directories to those > in the Windows Path variable. > > From ?system > > The search path for 'command' may be system-

[Rd] Minor edit to R-ints doc will be needed for R-2.15.2: axis() no longer uses .Internal()

2012-10-02 Thread Josh O'Brien
Hello, The second paragraph of Chapter 2: .Internal vs .Primitive of R-ints uses axis() as an example of a function that uses .Internal(). Here's the quote: > Functions using .Internal() wrapped in a closure are in general preferred as > this ensures > standard handling of named and default argu

Re: [Rd] How to build a list with missing values? What is missing, anyway?

2012-10-03 Thread Josh O'Brien
>Say I have argnames <- c("a", "b", "c"). >From that I want to construct the equivalent of alist(a=, b=, c=). Here's a one liner that'll do that for you: argnames <- letters[1:3] setNames(rep(list(bquote()), length(argnames)), argnames) - Josh -- View this message in context: http://r.78969

[Rd] R-lang edit: deparse(1:2) is no longer a good example of the R parser's non-invertibility

2013-02-04 Thread Josh O'Brien
Hello, Apparently thanks to improvements to the R parser, this example from section 6.1 of the R Language Definition no longer holds. > deparse(quote(c(1, 2))) [1] "c(1, 2)" > deparse(1:2) [1] "c(1, 2)" Even running R-2.14.2, I get instead > deparse(1:2) [1] "1:2" _

[Rd] Why does typeof() modify an object's "named" field?

2013-03-22 Thread Josh O'Brien
Hello, Doing typeof() on an object appears to reset the "named" field in its sxpinfo header to 2, which can change the way that subsequent subassignment operations are carried out: X <- 1:5e7 .Internal(inspect(X)) # @4eeb0008 13 INTSXP g0c7 [NAM(1)] (len=5000, tl=0) 1,2,3,4,5,... system.time

Re: [Rd] Avoid entering {} evaluation in debugger

2013-05-06 Thread Josh O'Brien
Vitalie Spinu wrote > Hi, > >f1 <- function(){ >browser() >print("aaa") >} > >f2 <- function(){ >a <- 12 >eval(envir = parent.frame(), > bquote({ >b <- .(a) >})) >} > > > Now do, > > f1() > > and enter