[Rd] Substitute adds id attribute?

From: Hadley Wickham <hadley_at_rice.edu>
Date: Tue, 20 Mar 2012 16:31:40 -0500


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/

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue 20 Mar 2012 - 21:43:47 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 21 Mar 2012 - 01:20:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive