[R] error preparing a package for lazy loading with R CMD
Patrick Giraudoux H
patrick.giraudoux at univ-fcomte.fr
Sun Jan 23 18:51:54 CET 2005
Dear Lister,
I work with R 2.0.1 and Windows XP, and meet a strange trouble trying to
make a R package with a make-package.bat file John Fox has kindly provided
(see detailed script below). I am working with it since some months with
excellent results (I do'nt use compiled C code so far). Just adding a new
function in the R directory today, when running make-package and thus
excuting the command ..\..\bin\R CMD build --force --binary --auto-zip
%1, I got the following message after the "compile" stage, preparing the
package for lazy loading :
preparing package pgirmess for lazy loading
Error in "names<-.default"(`*tmp*`, value =c("R", "Platform", "Date", :
names attribute[4] must be the same length as the vector [1]
Execution halted
make: ***[lazyload] Error 1
*** Installation of pgirmess failed ***
(pgirmess is the package name)
... and the zip file is not generated.
I have checked and rechecked everything during this (long) afternoon... and
get nothing except that if I drag out any of the *.r file of the R folder,
everything comes to be OK (except the function that has been dragged out is
missing...). It looks like if having added one extra function in the R
folder on the top of the earlier 32 (+ 2 data frames) makes problem.
I have then consulted John Fox offlist and he seems quite perplexed "I'm
not sure why you're experiencing this problem". On his advise I have
included "LazyLoad: no" in the package description file. In this case
everything goes smoothly then (except LazyLoad will not be activated), the
zip file is generated and the package can be installed from R.
Has anybody an idea about why a problem occurs when preparing the package
for lazy loading? Any remedy?
Kind regards,
Patrick
Make-Package script:
cd c:\R\rw2001\src\library
del %1\INDEX
del %1\data\00Index
del %1\chm\*.* /Q
..\..\bin\R CMD build --force --binary --auto-zip %1
..\..\bin\R CMD build --force %1
..\..\bin\R CMD check %1
cd %1.Rcheck
dvipdfm %1-manual
notepad 00check.log
cd ..
cd ..
>From: "John Fox" <jfox at mcmaster.ca>
>To: "'Patrick Giraudoux H'" <patrick.giraudoux at univ-fcomte.fr>
>Subject: RE: [R] writing a simple package in R 2.0 under Windows XP
>Date: Sun, 23 Jan 2005 11:41:25 -0500
>X-Mailer: Microsoft Office Outlook, Build 11.0.6353
>X-MIME-Autoconverted: from quoted-printable to 8bit by
>utinam.univ-fcomte.fr id j0NGfJoD011345
>
>Dear Patrick,
>
>I'm not sure why you're experiencing this problem.
>
>Two suggestions: (1) Since the problem appears to be with preparing the
>package for lazy loading, try adding the directive "LazyLoad: no" (without
>the quotes) to the package's DESCRIPTION file. (2) Rather than using my
>batch file, run the commands one at a time to see exactly where the problem
>is produced; then you could send a message to r-help.
>
>I hope this helps,
> John
More information about the R-help
mailing list