Message-ID: <4ED40A93.7080701@gmail.com>
Date: 2011-11-28T22:26:27Z
From: Duncan Murdoch
Subject: R CMD <custom>?
In-Reply-To: <CABdHhvF7LkvmMVUw0V06pEYJb=_L-FHO=kj-FbijYcRFLp_6+g@mail.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
>