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

2005-01-30 Thread Prof Brian Ripley
On Sun, 30 Jan 2005, Patrick Giraudoux H wrote:
Trouble just solved by Uwe Ligge! See below:
You have a wrong "Built" field in your DESCRIPTION file!!!
"Built: R 2.0.1;windows". Please don't specify such a line yourself, "R 
CMD build" does it for you.
Actually, installation does it: build adds Packaged: (which I have alwasys 
thought potentially confusing).

Ashes on my head and all these sort of things...
One of the changes that has been in 2.0.1 patched for some time is (from 
its NEWS)

PACKAGE INSTALLATION CHANGES
o   A package DESCRIPTION file which contains a Built field (it
should not!) is now worked around, with loud warnings.
BTW, you would have benefited from having read (in ONEWS now)
Packages are by default installed using lazy loading if they
have more than 25Kb of R code and did not use a saved image.
This can be overridden by INSTALL --[no-]lazy or via a field
in the DESCRIPTION file.  Note that as with --save, any other
packages which are required must be already installed.
and then you would have not found well-documented things `strange'.
The NEWS file is the `release notes' of R and does need to be read at each 
new release.

--
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595
__
R-help@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


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

2005-01-30 Thread Patrick Giraudoux H
Trouble just solved by Uwe Ligge! See below:

You have a wrong "Built" field in your DESCRIPTION file!!!
"Built: R 2.0.1;windows". Please don't specify such a line yourself, "R 
CMD build" does it for you.

Ashes on my head and all these sort of things...
Patrick
__
R-help@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


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

2005-01-30 Thread Patrick Giraudoux H
Trouble just solved by Uwe Ligge! See below:
You have a wrong "Built" field in your DESCRIPTION file!!!
"Built: R 2.0.1;windows"
Please don't specify such a line yourself, "R CMD build" does it for you.
Ashes on my head and all these sort of things...
Patrick
__
R-help@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


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

2005-01-29 Thread Patrick Giraudoux H
I have just tried adding a newline at the end of each file. Unsuccessfully. 
Lazy loading is still not accepted and the library can be compiled only 
with the "LazyLoad: no" option in the description file.

Thanks anyway,
Patrick
A 09:05 25/01/2005 +0100, Henrik Bengtsson a écrit :
A wild guess: Do you have one file one function? Could it be that the last
line in one of the files does not end with a newline and this is not taken
care of by the build with lazy loading? Try to add a newline at the end of
each of your files.
Henrik Bengtsson
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Patrick Giraudoux H
> Sent: Tuesday, January 25, 2005 6:25 AM
> To: r-help
> Cc: Liaw, Andy
> Subject: RE: [R] error preparing a package for lazy loading with R CMD
>
>
> 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" <[EMAIL PROTECTED]>
> > > >To: "'Patrick Giraudoux H'" <[EMAIL PROTECTED]>
> > > >Subj

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

2005-01-25 Thread Henrik Bengtsson
A wild guess: Do you have one file one function? Could it be that the last
line in one of the files does not end with a newline and this is not taken
care of by the build with lazy loading? Try to add a newline at the end of
each of your files.

Henrik Bengtsson

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Patrick Giraudoux H
> Sent: Tuesday, January 25, 2005 6:25 AM
> To: r-help
> Cc: Liaw, Andy
> Subject: RE: [R] error preparing a package for lazy loading with R CMD
> 
> 
> 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" <[EMAIL PROTECTED]>
> > > >To: "'Patrick Giraudoux H'" <[EMAIL PROTECTED]>
> > > >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: Micr

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

2005-01-24 Thread Patrick Giraudoux H
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" <[EMAIL PROTECTED]>
> >To: "'Patrick Giraudoux H'" <[EMAIL PROTECTED]>
> >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@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.
-- 

__
R-help@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


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

2005-01-24 Thread Liaw, Andy
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" <[EMAIL PROTECTED]>
> >To: "'Patrick Giraudoux H'" <[EMAIL PROTECTED]>
> >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@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
> 
>

__
R-help@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