From murdoch.duncan at gmail.com  Mon Nov 28 23:26:27 2011
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Mon, 28 Nov 2011 17:26:27 -0500
Subject: [Rd] R CMD <custom>?
In-Reply-To: <CABdHhvF7LkvmMVUw0V06pEYJb=_L-FHO=kj-FbijYcRFLp_6+g@mail.gmail.com>
References: <CAFDcVCSuR6159QO=0J8Xe9icY9AOLDnSUvMF=w7=r5+jaL=uZg@mail.gmail.com>
	<CABdHhvGnCtK-D6QoiGUjBt0oygMZq_BTbqC_brqUAF7AnLu2tQ@mail.gmail.com>
	<4ED3EC0F.4030407@gmail.com>
	<CABdHhvF7LkvmMVUw0V06pEYJb=_L-FHO=kj-FbijYcRFLp_6+g@mail.gmail.com>
Message-ID: <4ED40A93.7080701@gmail.com>

On 11-11-28 3:19 PM, Hadley Wickham wrote:
>> That does seem to mix up namespaces quite a bit.
>
> That was just a proposal - equally
>
> R CMD mypackage::mycommand
>
> could just run
>
> mypackage::mycommand()
>
> but then passing argument might get a bit confusing.
>
>> But what does it get you
>> that "Rscript -e" doesn't already give you?  You can set up your package so
>> that
>>
>> R CMD mypackage::mycommand
>>
>> executes a function, using delayedAssign or some of the more exotic features
>> (like external pointers and finalizers).
>
> Because you have to specify the path to that package?

Sorry, I was in a rush and typed the wrong thing.  I meant to type

Rscript -e mypackage::mycommand

which needs no path.

R CMD roxygen2
> is much easier to type, remember and is portable, compared to
> ~/R/roxygen2/something.r.  It also makes R CMD scripts extensible by
> packages in a consistent manner.

"Easier to type" is not a good argument, since any reasonable command 
line shell would allow you to abbreviate whatever you wanted.  "rox" is 
easier to type than R CMD roxygen2, and is easy enough to make happen.

Duncan Murdoch



>
> Hadley
>



[Rd] R CMD <custom>?
Duncan Murdoch