[Rd] Substitute adds id attribute?

Hadley Wickham hadley at rice.edu
Tue Mar 20 22:31:40 CET 2012


Hi all,

I can't figure out how to make this problem easily reproducible, but I
can demonstrate it very simply, so I hoped someone might be able to
suggest a place to start:

> f <- function(x) substitute(x)
> f(x)
x
> f(mpg)
mpg
attr(,"id")
[1] 11

It works as expected in a clean R session:

> f <- function(x) substitute(x)
> f(x)
x
> f(mpg)
mpg

but not after the following code

library(devtools)
install_github("staticdocs")
library(staticdocs)
build_package("ggplot2", tempdir())

Any ideas?

Thanks,

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



More information about the R-devel mailing list