Skip to content
Prev 47087 / 63424 Next

Where to drop a python script?

The old convention was that it went in the exec/ directory, but as you 
can see at 
http://cran.at.r-project.org/doc/manuals/r-devel/R-exts.html#Non_002dR-scripts-in-packages 
  it can be in inst/anyName/. A minor convenience of exec/ is that the 
directory has the same name in source and when installed, whereas 
inst/anyName gets moved to anyName/, so debugging can be a tiny bit 
easier with exec/.

Having just put a package (TSjson) on CRAN with a python script, here 
are a few other pointers for getting it on CRAN:

-SystemRequirements: should indicate if a particular version of python 
is needed, and any non-default modules that are needed. (My package does 
not work with Python 3 because some modules are not available.) Some of 
the libraries have changed, so it could be a bit tricky to make 
something work easily with both 2 and 3.

-You need a README to explain how to install Python. (If you look at or 
use mine, please let me know if you find problems.)

-The Linux and Sun CRAN test machines have Python 2 whereas winbuilder 
has Python 3. Be prepared to explain that the package will not work on 
one or the other.

Another option to system() is pipe()

Paul
On 13-10-30 03:15 PM, Dirk Eddelbuettel wrote: