From hadley at rice.edu  Tue Mar 20 22:31:40 2012
From: hadley at rice.edu (Hadley Wickham)
Date: Tue, 20 Mar 2012 16:31:40 -0500
Subject: [Rd] Substitute adds id attribute?
Message-ID: <CABdHhvEKaDNRDjf-3Rp=b=wvnMO-ZNvk8aLge9-U6K8BkJz4Sg@mail.gmail.com>

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/



[Rd] Substitute adds id attribute?
Hadley Wickham