[R] error preparing a package for lazy loading with R CMD

Patrick Giraudoux H patrick.giraudoux at univ-fcomte.fr
Tue Jan 25 06:24:43 CET 2005


That's the way John Fox advised to turn the problem. Indeed it works but 
doe snot explain this bug in lazy loading. I don't think that it may come 
for a syntax error somewhere. All the functions have been checked and the 
problem does not occur if any of the 35 functions is removed. Something 
happens when I add another function to the 34 already present. Strange.


A 08:45 24/01/2005 -0500, vous avez écrit :
>Not sure if this will help, but have you tried loading the package after
>install with no lazyload?   I've found that if there are syntax errors in
>the R source, that can give the problem you described.  Just a guess.
>
>Andy
>
> > From: Patrick Giraudoux H
> >
> > 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
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> > http://www.R-project.org/posting-guide.html
> >
> >
>
>
>------------------------------------------------------------------------------
>Notice:  This e-mail message, together with any attachments, contains 
>information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
>Jersey, USA 08889), and/or its affiliates (which may be known outside the 
>United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
>Banyu) that may be confidential, proprietary copyrighted and/or legally 
>privileged. It is intended solely for the use of the individual or entity 
>named on this message.  If you are not the intended recipient, and have 
>received this message in error, please notify us immediately by reply 
>e-mail and then delete it from your system.
>------------------------------------------------------------------------------ 
>




More information about the R-help mailing list