[R] Automating package building packages and repository uploading

Carlos J. Gil Bellosta cgb at datanalytics.com
Thu Jul 20 01:24:02 CEST 2006


Dear Rusers,

I have developed two packages for a client of mine. After new features
are added or bugs corrected, I upload them to my own web repository. I
create both source and binary versions.

In fact, I made an script that checks, builds, and uploads them via ftp.
However, I am facing two nuisances that do make it difficult to
automate:

1) Even if I build the binary version with the command

R CMD build --use-zip --binary $package

within my script, the output package still gets tarballed and gzipped
instead than simply zipped. I come around this automatically extracting
and compressing back the files but, am I missing something some other
option that would make all this simpler?

2) I expect my packages to be named something like
mypackage_1.3.12.tar.gz or mypackage_1.3.12.zip. However, "sometimes"
--I haven't looked at the code that decides the name to give to the
packages, so it looks quite "random" to me-- they get renamed into
something like mypackage_1.3.12_R_i486-pc-linux-gnu.tar.gz or
mypackage_1.3.12_R_i486-pc-linux-gnu.zip. The problem is that, then, the
update.packages() function cannot find them. Is there a way to prevent
this trailing string from appearing in the file name? Or else, is there
a way to have update.packages() find the package regardless of it?

I am running

platform       i486-pc-linux-gnu
arch           i486
os             linux-gnu
system         i486, linux-gnu
status
major          2
minor          3.1
year           2006
month          06
day            01
svn rev        38247
language       R
version.string Version 2.3.1 (2006-06-01)

on Debian Etch with kernel 2.6.15-1-k7.

Thank you very much.

Carlos J. Gil Bellosta
http://www.datanalytics.com
http://www.data-mining-blog.com



More information about the R-help mailing list