[Rd] as.name and namespaces

peter dalgaard pdalgd at gmail.com
Tue Apr 23 22:17:21 CEST 2013


On Apr 23, 2013, at 21:51 , Patrick Burns wrote:

> Okay, that's a good reason why it shouldn't.
> 
> Why it should is that I want to substitute
> the first element of a call to be a function
> including the namespace.

Offhand, I'd say that it shouldn't be a problem, but do you have a more concrete example?

-pd

> 
> Pat
> 
> 
> On 23/04/2013 18:32, peter dalgaard wrote:
>> 
>> On Apr 23, 2013, at 19:23 , Patrick Burns wrote:
>> 
>>> 'as.name' doesn't recognize a name with
>>> its namespace extension as a name:
>>> 
>>>> as.name("lm")
>>> lm
>>>> as.name("stats::lm")
>>> `stats::lm`
>>>> as.name("stats:::lm")
>>> `stats:::lm`
>>> 
>>> 
>>> Is there a reason why it shouldn't?
>> 
>> Any reason why it should? :: and ::: are operators. foo$bar is not the same as `foo$bar` either.
>> 
> 
> -- 
> Patrick Burns
> pburns at pburns.seanet.com
> twitter: @burnsstat @portfolioprobe
> http://www.portfolioprobe.com/blog
> http://www.burns-stat.com
> (home of:
> 'Impatient R'
> 'The R Inferno'
> 'Tao Te Programming')

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-devel mailing list