On Mon, Nov 28, 2011 at 12:19 PM, Hadley Wickham <had...@rice.edu> 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? 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.
When people run R CMD build, R CMD INSTALL, R CMD check etc, they are in a well defined working directory. It can be assumed that R CMD roxygen2 will be executed in the same directory. As so as you enter the R prompt, you cannot assume this working directory, and you have to document/specify which directory the command should be executed on. Because of this, I favor an 'R CMD roxygen2' solution. My use case/wish is to be able to provide 'R CMD Rdoc' (similar to 'R CMD roxygen2') and 'R CMD rsp' (similar to 'R CMD Sweave'). /Henrik > > Hadley > > -- > Assistant Professor / Dobelman Family Junior Chair > Department of Statistics / Rice University > http://had.co.nz/ > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel