[Rd] R CMD <custom>?

Duncan Murdoch murdoch.duncan at gmail.com
Mon Nov 28 23:26:27 CET 2011


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
>



More information about the R-devel mailing list