From h.wickham at gmail.com  Wed Apr 24 15:02:41 2013
From: h.wickham at gmail.com (Hadley Wickham)
Date: Wed, 24 Apr 2013 08:02:41 -0500
Subject: [Rd] as.name and namespaces
In-Reply-To: <5177A607.10706@pburns.seanet.com>
References: <5176C393.9090802@pburns.seanet.com>
	<3F6D53EB-1C02-42B4-AD2D-085D9E9E94C3@gmail.com>
	<5176E65B.50500@pburns.seanet.com> <5176EC94.3060607@gmail.com>
	<5177A607.10706@pburns.seanet.com>
Message-ID: <CABdHhvFBwPTpKL-Ry8Vy47ycnsJngjfF_bOi_H8nt+D4kheOQQ@mail.gmail.com>

On Wed, Apr 24, 2013 at 4:29 AM, Patrick Burns <pburns at pburns.seanet.com> wrote:
> Here is an example problem:
>
>> mycall <- expression(lm(Y ~ x))[[1]]
>> mycall
> lm(Y ~ x)
>> newname <- "stats::lm"
>
>> desiredResult
> stats::lm(Y ~ x)
>
> I've solved the problem in the kludgy way of
> deparsing, fixing the string and then parsing.

I'm working on a comprehensive write up of computing on the language
at the moment. It's still a bit rough, but you might find
https://github.com/hadley/devtools/wiki/Expressions#structure-of-expressions
and https://github.com/hadley/devtools/wiki/Expressions#calls to be
useful.

Hadley

--
Chief Scientist, RStudio
http://had.co.nz/



[Rd] as.name and namespaces
Hadley Wickham