Re: [Rd] (PR#8337) formatC adds leading space -- on some Windoze

2005-11-22 Thread ripley
On Tue, 22 Nov 2005 [EMAIL PROTECTED] wrote:

>> "KevinW" == Kevin Wright <[EMAIL PROTECTED]>
>> on Mon, 21 Nov 2005 18:13:36 +0100 (CET) writes:
>
>KevinW> Full_Name: Kevin Wright
>KevinW> Version: 2.2.0
>KevinW> OS: Windows 2000
>   ^^^
> this must be part of the problem

It is, and it is a known inconsistency with Linux (but I do not consider 
it to be a bug or `wrong behavior' or not `reasonable').

Windows always uses three digits for the exponent, e.g. E+001. This 
results from adjusting the returned result to be more consistent with 
other platforms.  (BTW, since width (sic) is a lower bound, it _is_ 
respected.)  Even if the layout is not ideal, the results are at least 
diff-able against those from other platforms.

If Kevin (or anyone else) wants it done even more consistently, he could 
contribute a patch.  Now, we _have_ done that for print(), but it did not 
seem worth it for formatC (especially as sprintf() is now widely used and 
would also need to be made consistent). (It also did not seem worth it 
given how little credit is given for such work.)


>KevinW> Submission from: (NULL) (170.54.58.4)
>
>
>
>KevinW> Apologies if my expectations (or reading of the man page) are 
> incorrect.
>
>KevinW> I seem unable to left-justify exponential format
>KevinW> numbers.  There appears to always be an extra space
>KevinW> inserted to the left.
>
>KevinW> Using the example from the formatC help page:
>
>R> xx  <- pi * 10^(-5:4)
>
>R> cbind(formatC(xx, wid = 9, flag = "-"))
>KevinW>  [,1]
>KevinW> [1,] " 3.142e-05"
>KevinW> [2,] "0.0003142"
>KevinW> [3,] "0.003142 "
>KevinW> [4,] "0.03142  "
>KevinW> [5,] "0.3142   "
>KevinW> [6,] "3.142"
>KevinW> [7,] "31.42"
>KevinW> [8,] "314.2"
>KevinW> [9,] "3142 "
>KevinW> [10,] " 3.142e+04"
>
> which is also not obeying the 'wid' argument.
>
> I get something much more reasonable:
>
>  [,1]
> [1,] "3.142e-05"
> [2,] "0.0003142"
> [3,] "0.003142 "
> [4,] "0.03142  "
> [5,] "0.3142   "
> [6,] "3.142"
> [7,] "31.42"
> [8,] "314.2"
> [9,] "3142 "
> [10,] "3.142e+04"
>
> formatC uses your system's C library printf {that's where the
> "C" comes from in 'formatC'} which seems to be
> broken or at least not performing as we think it should.
>
> On a "Windows 2003 Server" I have access to, I see the same
> wrong behavior as above.
>
> Martin Maechler, ETH Zurich
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
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-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] NAMESPACE, S4, and .onLoad

2005-11-22 Thread Prof Brian Ripley
On Mon, 21 Nov 2005, Seth Falcon wrote:

> The Writing R Extensions manual instructs developers who use S4
> classes and methods in a package with a name space to:
>
>There needs to be an .onLoad action to ensure that the methods package
>is loaded and attached:
>
> .onLoad <- function(lib, pkg) require(methods)
>
> I'm wondering if listing methods in the Depends field of the package's
> DESCRIPTION file is sufficient.  My understanding is that doing so
> will result in the methods package being loaded and attached.

It will do so when the _package_ is loaded, but not when its _namespace_ 
is loaded.  So the advice is correct, as it is always possible that other 
packages will load your package's namespace (via imports) and not 
themselves depend on the 'methods' package and be used in a session with 
a non-default set of packages including 'methods'.  (This is unlikely, of 
course, which is why this may elude detection.)

At one time (and it may still be so) loading the 'methods' namespace and 
not the 'methods' package left R in an internally inconsistent state. 
When I discussed this with John Chambers, his preference was that the 
'methods' package be loaded and attached whenever S4 methods are in use. 
The advice does reflect that (rather than, say, advising that the 
'methods' namespace be imported.)

-- 
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-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] make check fails for R 2.3.0 (PR#8343)

2005-11-22 Thread ahenningsen
Full_Name: Arne Henningsen
Version: 2.3.0, 2005-11-21, i686-pc-linux-gnu
OS: SuSE Linux 9.0, Kernel 2.4.21
Submission from: (NULL) (134.245.140.242)


I did not find any problems in "./configure" and "make", but "make check"
fails:

make[4]: Entering directory `/home/suapm095/Download/R-devel/tests/Examples'
collecting examples for package 'base' ...
make[5]: Entering directory `/home/suapm095/Download/R-devel/src/library'
 >>> Building/Updating help pages for package 'base'
 Formats: text html latex example
make[5]: Leaving directory `/home/suapm095/Download/R-devel/src/library'
running code in 'base-Ex.R' ...make[4]: *** [base-Ex.Rout] Fehler 1
make[4]: Leaving directory `/home/suapm095/Download/R-devel/tests/Examples'
make[3]: *** [test-Examples-Base] Fehler 2
make[3]: Leaving directory `/home/suapm095/Download/R-devel/tests/Examples'
make[2]: *** [test-Examples] Fehler 2
make[2]: Leaving directory `/home/suapm095/Download/R-devel/tests'
make[1]: *** [test-all-basics] Fehler 1
make[1]: Leaving directory `/home/suapm095/Download/R-devel/tests'
make: *** [check] Fehler 2


At the end of the file "tests/Examples/base-Ex.Rout.fail" I found:

> i39 <- sapply(3:9, seq) # list of vectors
> sapply(i39, fivenum)
 [,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,]  1.0  1.01  1.0  1.0  1.01
[2,]  1.5  1.52  2.0  2.5  2.53
[3,]  2.0  2.53  3.5  4.0  4.55
[4,]  2.5  3.54  5.0  5.5  6.57
[5,]  3.0  4.05  6.0  7.0  8.09
> 
> hist(replicate(100, mean(rexp(10
Fehler in hist.default(replicate(100, mean(rexp(10 : 
invalid number of 'breaks'
Ausführung angehalten

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] make check fails for R 2.3.0 (PR#8343)

2005-11-22 Thread ripley
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--27464147-1978628741-1132653680=:25449
Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-ID: <[EMAIL PROTECTED]>

On Tue, 22 Nov 2005 [EMAIL PROTECTED] wrote:

> Full_Name: Arne Henningsen
> Version: 2.3.0, 2005-11-21, i686-pc-linux-gnu

Please use the svn revision for unreleased versions of R.  There is no 'R=
=20
2.3.0' and the version changes several times a day.  But we do expect=20
'make check' to have been run successfully on each of those versions.

> OS: SuSE Linux 9.0, Kernel 2.4.21
> Submission from: (NULL) (134.245.140.242)

You are reporting as a bug in R a problem on your own system in an=20
unreleased ('unstable') version of R.  Since it is unstable and=20
unreleased, such things are by definition not bugs in R.

Others are not seeing this, so we cannot do anything about the problems=20
seen on your system.  This is not at all a new test, and although random=20
it is run with set.seed(1). I can reproduce the result in the output file=
=20
(on my systems) exactly by

> set.seed(1)
> hist(replicate(100, mean(rexp(10

Please see if you can debug it on your own system.  (My guess would be=20
that it only occurs as part of the test file.)

> I did not find any problems in "./configure" and "make", but "make check"
> fails:
>
> make[4]: Entering directory `/home/suapm095/Download/R-devel/tests/Exampl=
es'
> collecting examples for package 'base' ...
> make[5]: Entering directory `/home/suapm095/Download/R-devel/src/library'
> >>> Building/Updating help pages for package 'base'
> Formats: text html latex example
> make[5]: Leaving directory `/home/suapm095/Download/R-devel/src/library'
> running code in 'base-Ex.R' ...make[4]: *** [base-Ex.Rout] Fehler 1
> make[4]: Leaving directory `/home/suapm095/Download/R-devel/tests/Example=
s'
> make[3]: *** [test-Examples-Base] Fehler 2
> make[3]: Leaving directory `/home/suapm095/Download/R-devel/tests/Example=
s'
> make[2]: *** [test-Examples] Fehler 2
> make[2]: Leaving directory `/home/suapm095/Download/R-devel/tests'
> make[1]: *** [test-all-basics] Fehler 1
> make[1]: Leaving directory `/home/suapm095/Download/R-devel/tests'
> make: *** [check] Fehler 2
>
>
> At the end of the file "tests/Examples/base-Ex.Rout.fail" I found:
>
>> i39 <- sapply(3:9, seq) # list of vectors
>> sapply(i39, fivenum)
> [,1] [,2] [,3] [,4] [,5] [,6] [,7]
> [1,]  1.0  1.01  1.0  1.0  1.01
> [2,]  1.5  1.52  2.0  2.5  2.53
> [3,]  2.0  2.53  3.5  4.0  4.55
> [4,]  2.5  3.54  5.0  5.5  6.57
> [5,]  3.0  4.05  6.0  7.0  8.09
>>
>> hist(replicate(100, mean(rexp(10
> Fehler in hist.default(replicate(100, mean(rexp(10 :
> =09invalid number of 'breaks'
> Ausf=FChrung angehalten

--=20
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
--27464147-1978628741-1132653680=:25449--

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] [PATCH] Add fpicflags for Intel(R) Fortran Compiler (PR#8344)

2005-11-22 Thread kugelfang
Full_Name: Danny van Dyk
Version: R-2.2.0
OS: Gentoo/AMD64
Submission from: (NULL) (83.129.50.65)


I have successfully compiled R-2.2.0 using ifc-9.0.026 on my x86_64 box.
The only (minor) change that hade to be made was adding fpicflags="-fPIC" to
configure.ac in case F77 matches either "ifc" (old name) or "ifort" (new name).

Please apply following patch:

[EMAIL PROTECTED] trunk $ svn diff
Index: configure.ac
===
--- configure.ac(revision 36420)
+++ configure.ac(working copy)
@@ -942,7 +942,7 @@
   rm -f Imakefile Makefile
 fi

-## Step 2.  GNU compilers.
+## Step 2.  GNU and Intel compilers.
 if test "${GCC}" = yes; then
   cpicflags="-fPIC"
   shlib_ldflags="-shared"
@@ -954,6 +954,11 @@
   cxxpicflags="-fPIC"
   shlib_cxxldflags="-shared"
 fi
+case "${F77}" in
+  ifc|ifort)
+fpicflags="-fPIC"
+;;
+esac

 ## Step 3.  Individual platform overrides.
 case "${host_os}" in
===

Danny

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] make check fails for R 2.3.0 (PR#8343)

2005-11-22 Thread Arne Henningsen
On Tuesday 22 November 2005 12:55, [EMAIL PROTECTED] wrote:
>   This message is in MIME format.  The first part should be readable text,
>   while the remaining parts are likely unreadable without MIME-aware tools.
>
> --27464147-1978628741-1132653680=:25449
> Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: QUOTED-PRINTABLE
> Content-ID: <[EMAIL PROTECTED]>
>
> On Tue, 22 Nov 2005 [EMAIL PROTECTED] wrote:
> > Full_Name: Arne Henningsen
> > Version: 2.3.0, 2005-11-21, i686-pc-linux-gnu
>
> Please use the svn revision for unreleased versions of R.  

OK. I have done this, but the same error still occurs.

> There is no 'R= =20
> 2.3.0' and the version changes several times a day.  But we do expect=20
> 'make check' to have been run successfully on each of those versions.
>
> > OS: SuSE Linux 9.0, Kernel 2.4.21
> > Submission from: (NULL) (134.245.140.242)
>
> You are reporting as a bug in R a problem on your own system in an=20
> unreleased ('unstable') version of R.  

I used this version to check my R packages because the packages on CRAN are 
checked by R-devel, too.

> Since it is unstable and=20 
> unreleased, such things are by definition not bugs in R.

Sorry, I did not know this. I thought that my report could help you. 
The next time when I will find an error in R-devel I won't report it.

> Others are not seeing this, so we cannot do anything about the problems=20
> seen on your system.  This is not at all a new test, and although random=20
> it is run with set.seed(1). I can reproduce the result in the output file=
> =20
> (on my systems) exactly by
>
> > set.seed(1)
> > hist(replicate(100, mean(rexp(10
>
> Please see if you can debug it on your own system.  (My guess would be=20
> that it only occurs as part of the test file.)

Yes, that's exactly the case. If you want any further information please don't 
hesitate to contact me. Otherwise I won't bother you anymore with this issue.

Best,
Arne

> > I did not find any problems in "./configure" and "make", but "make check"
> > fails:
> >
> > make[4]: Entering directory
> > `/home/suapm095/Download/R-devel/tests/Exampl=
>
> es'
>
> > collecting examples for package 'base' ...
> > make[5]: Entering directory `/home/suapm095/Download/R-devel/src/library'
> >
> > >>> Building/Updating help pages for package 'base'
> >
> > Formats: text html latex example
> > make[5]: Leaving directory `/home/suapm095/Download/R-devel/src/library'
> > running code in 'base-Ex.R' ...make[4]: *** [base-Ex.Rout] Fehler 1
> > make[4]: Leaving directory
> > `/home/suapm095/Download/R-devel/tests/Example=
>
> s'
>
> > make[3]: *** [test-Examples-Base] Fehler 2
> > make[3]: Leaving directory
> > `/home/suapm095/Download/R-devel/tests/Example=
>
> s'
>
> > make[2]: *** [test-Examples] Fehler 2
> > make[2]: Leaving directory `/home/suapm095/Download/R-devel/tests'
> > make[1]: *** [test-all-basics] Fehler 1
> > make[1]: Leaving directory `/home/suapm095/Download/R-devel/tests'
> > make: *** [check] Fehler 2
> >
> > At the end of the file "tests/Examples/base-Ex.Rout.fail" I found:
> >> i39 <- sapply(3:9, seq) # list of vectors
> >> sapply(i39, fivenum)
> >
> > [,1] [,2] [,3] [,4] [,5] [,6] [,7]
> > [1,]  1.0  1.01  1.0  1.0  1.01
> > [2,]  1.5  1.52  2.0  2.5  2.53
> > [3,]  2.0  2.53  3.5  4.0  4.55
> > [4,]  2.5  3.54  5.0  5.5  6.57
> > [5,]  3.0  4.05  6.0  7.0  8.09
> >
> >> hist(replicate(100, mean(rexp(10
> >
> > Fehler in hist.default(replicate(100, mean(rexp(10 :
> > =09invalid number of 'breaks'
> > Ausf=FChrung angehalten
>
> --=20
> 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
> --27464147-1978628741-1132653680=:25449--
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Arne Henningsen
Department of Agricultural Economics
University of Kiel
Olshausenstr. 40
D-24098 Kiel (Germany)
Tel: +49-431-880 4445
Fax: +49-431-880 1397
[EMAIL PROTECTED]
http://www.uni-kiel.de/agrarpol/ahenningsen/

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] make check fails for R 2.3.0 (PR#8343)

2005-11-22 Thread ahenningsen
On Tuesday 22 November 2005 12:55, [EMAIL PROTECTED] wrote:
>   This message is in MIME format.  The first part should be readable text,
>   while the remaining parts are likely unreadable without MIME-aware tools.
>
> --27464147-1978628741-1132653680=:25449
> Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: QUOTED-PRINTABLE
> Content-ID: <[EMAIL PROTECTED]>
>
> On Tue, 22 Nov 2005 [EMAIL PROTECTED] wrote:
> > Full_Name: Arne Henningsen
> > Version: 2.3.0, 2005-11-21, i686-pc-linux-gnu
>
> Please use the svn revision for unreleased versions of R.  

OK. I have done this, but the same error still occurs.

> There is no 'R= =20
> 2.3.0' and the version changes several times a day.  But we do expect=20
> 'make check' to have been run successfully on each of those versions.
>
> > OS: SuSE Linux 9.0, Kernel 2.4.21
> > Submission from: (NULL) (134.245.140.242)
>
> You are reporting as a bug in R a problem on your own system in an=20
> unreleased ('unstable') version of R.  

I used this version to check my R packages because the packages on CRAN are 
checked by R-devel, too.

> Since it is unstable and=20 
> unreleased, such things are by definition not bugs in R.

Sorry, I did not know this. I thought that my report could help you. 
The next time when I will find an error in R-devel I won't report it.

> Others are not seeing this, so we cannot do anything about the problems=20
> seen on your system.  This is not at all a new test, and although random=20
> it is run with set.seed(1). I can reproduce the result in the output file=
> =20
> (on my systems) exactly by
>
> > set.seed(1)
> > hist(replicate(100, mean(rexp(10
>
> Please see if you can debug it on your own system.  (My guess would be=20
> that it only occurs as part of the test file.)

Yes, that's exactly the case. If you want any further information please don't 
hesitate to contact me. Otherwise I won't bother you anymore with this issue.

Best,
Arne

> > I did not find any problems in "./configure" and "make", but "make check"
> > fails:
> >
> > make[4]: Entering directory
> > `/home/suapm095/Download/R-devel/tests/Exampl=
>
> es'
>
> > collecting examples for package 'base' ...
> > make[5]: Entering directory `/home/suapm095/Download/R-devel/src/library'
> >
> > >>> Building/Updating help pages for package 'base'
> >
> > Formats: text html latex example
> > make[5]: Leaving directory `/home/suapm095/Download/R-devel/src/library'
> > running code in 'base-Ex.R' ...make[4]: *** [base-Ex.Rout] Fehler 1
> > make[4]: Leaving directory
> > `/home/suapm095/Download/R-devel/tests/Example=
>
> s'
>
> > make[3]: *** [test-Examples-Base] Fehler 2
> > make[3]: Leaving directory
> > `/home/suapm095/Download/R-devel/tests/Example=
>
> s'
>
> > make[2]: *** [test-Examples] Fehler 2
> > make[2]: Leaving directory `/home/suapm095/Download/R-devel/tests'
> > make[1]: *** [test-all-basics] Fehler 1
> > make[1]: Leaving directory `/home/suapm095/Download/R-devel/tests'
> > make: *** [check] Fehler 2
> >
> > At the end of the file "tests/Examples/base-Ex.Rout.fail" I found:
> >> i39 <- sapply(3:9, seq) # list of vectors
> >> sapply(i39, fivenum)
> >
> > [,1] [,2] [,3] [,4] [,5] [,6] [,7]
> > [1,]  1.0  1.01  1.0  1.0  1.01
> > [2,]  1.5  1.52  2.0  2.5  2.53
> > [3,]  2.0  2.53  3.5  4.0  4.55
> > [4,]  2.5  3.54  5.0  5.5  6.57
> > [5,]  3.0  4.05  6.0  7.0  8.09
> >
> >> hist(replicate(100, mean(rexp(10
> >
> > Fehler in hist.default(replicate(100, mean(rexp(10 :
> > =09invalid number of 'breaks'
> > Ausf=FChrung angehalten
>
> --=20
> 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
> --27464147-1978628741-1132653680=:25449--
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Arne Henningsen
Department of Agricultural Economics
University of Kiel
Olshausenstr. 40
D-24098 Kiel (Germany)
Tel: +49-431-880 4445
Fax: +49-431-880 1397
[EMAIL PROTECTED]
http://www.uni-kiel.de/agrarpol/ahenningsen/

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] make check fails for R 2.3.0 (PR#8343)

2005-11-22 Thread Liaw, Andy
From: [EMAIL PROTECTED]
> 
> On Tuesday 22 November 2005 12:55, [EMAIL PROTECTED] wrote:
[snip]
> > Since it is unstable and=20 
> > unreleased, such things are by definition not bugs in R.
> 
> Sorry, I did not know this. I thought that my report could help you. 
> The next time when I will find an error in R-devel I won't report it.

I do not believe that's the intention.  Problem with building R-devel should
be reported, but as post to R-devel (the list), rather than filed as bug
report.

Andy

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] install.packages in R 2.2.0

2005-11-22 Thread Iago Mosqueira
Dear all,

I am having trouble with install.packages() when specifying a non-CRAN
repository. The command below works in R 2.1.0 and R 2.1.1 compiled from
source in Linux, bringing up the Tcl/Tk interface for selection, but in
2.2.0 I get

> install.packages(repos='http://flr-project.org/R')
Error in install.packages(repos = "http://flr-project.org/R";) : 
argument "pkgs" is missing, with no default
In addition: Warning message:
number of rows of result
is not a multiple of vector length (arg 2) in: cbind(1, res0,
Repository = repos) 

Has there been any change to this function, or the way repositories
should be organised, that I have missed in the NEWS file?

For example, a package file called FLCore_1.0.7.tar.gz is located in
http://flr-project/R/src/contrib/ and the relevant entry in the PCAKGEs
file looks like this:

Package: FLCore
Version: 1.0.7
Depends: R (>=2.2.0), methods, graphics, stats, lattice

but install.packages from R 2.2.0 is not getting to it.

In contrast, The FLCore_1.0.3.3.tar.gz file, with entry

Package: FLCore
Version: 1.0.3.3
Depends: R (>=2.1.0), methods, graphics, stats, lattice

gets picked up when install.packages is called from R 2.1.1. There are
other packages in this repository that do not have versions dependent on
R version, but still the same problem appears.

Any ideas? Thanks very much,


Iago Mosqueira

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] [PATCH] Add fpicflags for Intel(R) Fortran Compiler (PR#8344)

2005-11-22 Thread ripley
1) The documented way to specify this is to set FPICFLAGS in config.site: 
see the example in R-admin for the PG compilers.  When you tried that, 
what went wrong?

2) It seems strange to specify this for the Fortran compiler and not the C 
or C++ compiler.

3) You have suggested the change to a section for all OSes.  Do you know 
for sure that all compilers called 'ifort' on all OSes need the -fPIC 
flag?  Or is it really just for Linux (and AFAICS, just x86_64 Linux, as 
i386 Linux seems to work with icc/ifort without it).

On Tue, 22 Nov 2005 [EMAIL PROTECTED] wrote:

> Full_Name: Danny van Dyk
> Version: R-2.2.0
> OS: Gentoo/AMD64
> Submission from: (NULL) (83.129.50.65)
>
>
> I have successfully compiled R-2.2.0 using ifc-9.0.026 on my x86_64 box.
> The only (minor) change that hade to be made was adding fpicflags="-fPIC" to
> configure.ac in case F77 matches either "ifc" (old name) or "ifort" (new 
> name).
>
> Please apply following patch:
>
> [EMAIL PROTECTED] trunk $ svn diff
>Index: configure.ac
> ===
> --- configure.ac(revision 36420)
> +++ configure.ac(working copy)
> @@ -942,7 +942,7 @@
>   rm -f Imakefile Makefile
> fi
>
> -## Step 2.  GNU compilers.
> +## Step 2.  GNU and Intel compilers.
> if test "${GCC}" = yes; then
>   cpicflags="-fPIC"
>   shlib_ldflags="-shared"
> @@ -954,6 +954,11 @@
>   cxxpicflags="-fPIC"
>   shlib_cxxldflags="-shared"
> fi
> +case "${F77}" in
> +  ifc|ifort)
> +fpicflags="-fPIC"
> +;;
> +esac
>
> ## Step 3.  Individual platform overrides.
> case "${host_os}" in
> ===
>
> Danny
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
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-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] make check fails for R 2.3.0 (PR#8343)

2005-11-22 Thread Martin Maechler
> "Arne" == Arne Henningsen <[EMAIL PROTECTED]>
> on Tue, 22 Nov 2005 16:19:19 +0100 writes:

.

>> You are reporting as a bug in R a problem on your own system in an=20
>> unreleased ('unstable') version of R.  

Arne> I used this version to check my R packages because the
Arne> packages on CRAN are checked by R-devel, too.

>> Since it is unstable and
>> unreleased, such things are by definition not bugs in R.

Arne> Sorry, I did not know this. I thought that my report could help you. 
Arne> The next time when I will find an error in R-devel I won't report it.

No; please do "report" the problem, which may be useful for
development, but please do *NOT* use the bug repository, and
probably don't assume it's a bug in R, unless you have quite a
bit experience about R bugs and non-bugs.

Instead, just send e-mail to R-devel and explain,
and you may actually helping R development, particularly if you
are willing to investigate some details that we ma ask you
about.


>> Others are not seeing this, so we cannot do anything
>> about the problems=20 seen on your system.  This is not
>> at all a new test, and although random=20 it is run with
>> set.seed(1). I can reproduce the result in the output
>> file= =20 (on my systems) exactly by
>> 
>> > set.seed(1)
>> > hist(replicate(100, mean(rexp(10
>> 
>> Please see if you can debug it on your own system.  (My guess would be=20
>> that it only occurs as part of the test file.)

Arne> Yes, that's exactly the case. If you want any further
Arne> information please don't hesitate to contact
Arne> me. Otherwise I won't bother you anymore with this
Arne> issue.

Too bad.
It might have been interesting to see what

 set.seed(1)
 replicate(100, mean(rexp(10)))

or also

 set.seed(1)
 hist(replicate(100, mean(rexp(10
 traceback()
 ##^

gives on your R-devel installation.
That's why Brian Ripley helped you by mentioning 'set.seed(1)'.

Regards,
Martin Maechler, ETH Zurich

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] make check fails for R 2.3.0 (PR#8343)

2005-11-22 Thread Arne Henningsen
On Tuesday 22 November 2005 17:34, Martin Maechler wrote:
> > "Arne" == Arne Henningsen <[EMAIL PROTECTED]>
> > on Tue, 22 Nov 2005 16:19:19 +0100 writes:
>
> .
>
> >> You are reporting as a bug in R a problem on your own system in
> >> an=20 unreleased ('unstable') version of R.
>
> Arne> I used this version to check my R packages because the
> Arne> packages on CRAN are checked by R-devel, too.
>
> >> Since it is unstable and
> >> unreleased, such things are by definition not bugs in R.
>
> Arne> Sorry, I did not know this. I thought that my report could help
> you. Arne> The next time when I will find an error in R-devel I won't
> report it.
>
> No; please do "report" the problem, which may be useful for
> development, but please do *NOT* use the bug repository, and
> probably don't assume it's a bug in R, unless you have quite a
> bit experience about R bugs and non-bugs.
>
> Instead, just send e-mail to R-devel and explain,
> and you may actually helping R development, particularly if you
> are willing to investigate some details that we ma ask you
> about.
>
> >> Others are not seeing this, so we cannot do anything
> >> about the problems=20 seen on your system.  This is not
> >> at all a new test, and although random=20 it is run with
> >> set.seed(1). I can reproduce the result in the output
> >> file= =20 (on my systems) exactly by
> >>
> >> > set.seed(1)
> >> > hist(replicate(100, mean(rexp(10
> >>
> >> Please see if you can debug it on your own system.  (My guess would
> >> be=20 that it only occurs as part of the test file.)
>
> Arne> Yes, that's exactly the case. If you want any further
> Arne> information please don't hesitate to contact
> Arne> me. Otherwise I won't bother you anymore with this
> Arne> issue.
>
> Too bad.
> It might have been interesting to see what
>
>  set.seed(1)
>  replicate(100, mean(rexp(10)))
>
> or also
>
>  set.seed(1)
>  hist(replicate(100, mean(rexp(10
>  traceback()
>  ##^
>
> gives on your R-devel installation.
> That's why Brian Ripley helped you by mentioning 'set.seed(1)'.

It is exactly as Brian Ripley said: If I just start R and execute
   set.seed(1)
   hist(replicate(100, mean(rexp(10
everything works well. However, if I run "make check" the error occurs.
Now I have tried something inbetween: I started R and source()d the file that 
caused the error. The error occured again:
R> sink("base-Ex.Rout")
R> source("tests/Examples/base-Ex.R",echo=TRUE)
Warnung in gamma(x) :NaNs wurden erzeugt
Warnung in gamma(x) :NaNs wurden erzeugt
Warnung in gamma(x) :NaNs wurden erzeugt
Fehler in assign("y", 2, env = e) : kann keine Bindungen zu einer 
abgeschlossenen Umgebung hinzufügen
Fehler in assign("x", 2, env = e) : kann den Wert einer festgestellten Bindung 
nicht ändern
Warnung in cbind(1, 1:7, diag(3)) :number of rows of result
is not a multiple of vector length (arg 1)
Warnung in cbind(1, 0, matrix(1, nrow = 0, ncol = 4)) :
 number of rows of result
is not a multiple of vector length (arg 1)
Warnung in withCallingHandlers({ :A
Warnung in data.matrix(DF) :Klasseninformation für eine oder mehrere Spalten 
verloren
Garbage collection 25 = 17+1+7 (level 2) ...
221048 cons cells free (47%)
10.2 Mbytes of heap free (90%)
Warnung in sqrt(x) :NaNs wurden erzeugt
Warnung in sqrt(x) :NaNs wurden erzeugt
Warnung in sin(Inf) :NaNs wurden erzeugt
Warnung in cos(Inf) :NaNs wurden erzeugt
Warnung in tan(Inf) :NaNs wurden erzeugt
Fehler in hist.default(replicate(100, mean(rexp(10 :
invalid number of 'breaks'


Then I typed
R> traceback()
6: stop("invalid number of 'breaks'")
5: hist.default(replicate(100, mean(rexp(10
4: hist(replicate(100, mean(rexp(10
3: eval.with.vis(expr, envir, enclos)
2: eval.with.vis(ei, envir)
1: source("tests/Examples/base-Ex.R")

After sourcing this file it is impossible to use hist() because always the 
same error message occurs:
R> hist(rnorm(55))
Fehler in hist.default(rnorm(55)) : invalid number of 'breaks'
R> traceback()
3: stop("invalid number of 'breaks'")
2: hist.default(rnorm(55))
1: hist(rnorm(55))
R> hist(c(1,2,2))
Fehler in hist.default(c(1, 2, 2)) : invalid number of 'breaks'
R> traceback()
3: stop("invalid number of 'breaks'")
2: hist.default(c(1, 2, 2))
1: hist(c(1, 2, 2))

This seems to be independent from argument x (the values).

Cheers,
Arne

> Regards,
> Martin Maechler, ETH Zurich
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Arne Henningsen
Department of Agricultural Economics
University of Kiel
Olshausenstr. 40
D-24098 Kiel (Germany)
Tel: +49-431-880 4445
Fax: +49-431-880 1397
[EMAIL PROTECTED]
http://www.uni-kiel.de/agrarpol/ahenningsen/

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] [PATCH] Add fpicflags for Intel(R) Fortran Compiler (PR#8344)

2005-11-22 Thread kugelfang
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dear Prof. Ripley,

Prof Brian Ripley schrieb:
| 1) The documented way to specify this is to set FPICFLAGS in
| config.site: see the example in R-admin for the PG compilers.  When you
| tried that, what went wrong?
Nothing went wrong. However, I was of the opinion that support of
ifc/ifort 'out-of-the-box' is worthwhile. This is why I asked to include
it into the source-tree. As a matter of fact, I stumbled upon this when
testing Gentoo's R-2.2.0 buildscripts and added a similar patch to our
repository.

| 2) It seems strange to specify this for the Fortran compiler and not the
| C or C++ compiler.
I used the combination of 'gcc/g++/ifort' to build and test R. Testing
the combination of 'icc/ifort' on Gentoo is scheduled already.

| 3) You have suggested the change to a section for all OSes.  Do you know
| for sure that all compilers called 'ifort' on all OSes need the -fPIC
| flag?  Or is it really just for Linux (and AFAICS, just x86_64 Linux, as
| i386 Linux seems to work with icc/ifort without it).
a) For building shared ELF-libraries on x86_64 and ia64, you need to
instruct the compiler to build PIC. As a matter of fact, this isn't
necessary for x86, but it is strongly recommended as it should improve
performance due to the lack of text relocations the dynamic linker would
have to perform otherwise. This affects all OSes that can handle ELF
binaries (Linux, FreeBSD, Solaris, tbc.).

b) I surely can't guarantee that there never will be a different fortran
compiler with same name on any OS. However, I think that it is a safe
assumption to say that there currently is no such compiler on OSes
supported by autotools.


The number of target OSes and and supported ISAs makes it - in my eyes -
worthwhile to add the check to the 'general' section of the configure.ac
script. If - in a rare case - a conflict with other compiler emerged, it
would still be possible to work around a problem in the following
section of the script: '## Step 3.  Individual platform overrides.'.
(Emphasis here on 'individual' and 'override')

Danny
- --
Danny van Dyk <[EMAIL PROTECTED]>
Gentoo/AMD64 Project, Gentoo Scientific Project
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDg120aVNL8NrtU6IRAqVFAJ9Nv3FnfUjzGU2q4FEf+3TRek2HTQCfQG4R
DD5dVT076/1HBJw5B4N+mck=
=eBBz
-END PGP SIGNATURE-

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] failure in `setClass' examples

2005-11-22 Thread Sebastian Luque
Hello,

Below is what I got running the examples from `setClass'.  Could somebody
please help explain why the last `setIs' call is returning the warning and
whether this is expected?


R>  setClass("track",
+   representation(x="numeric", y="numeric"))
[1] "track"
R>  setClass("trackCurve",
+   representation("track", smooth = "numeric"))
[1] "trackCurve"
R>  setClass("trackMultiCurve",
+   representation(x="numeric", y="matrix", smooth="matrix"),
+   prototype = list(x=numeric(), y=matrix(0,0,0),
+smooth= matrix(0,0,0)))
[1] "trackMultiCurve"
R>  try(setIs("trackMultiCurve", "trackCurve",
+  test = function(obj) {ncol(slot(obj, "y")) == 1}))
Warning message:
there is no automatic definition for as(object, "trackCurve") <- value when 
object has class "trackMultiCurve" and no 'replace' argument was supplied; 
replacement will be an error in: makeExtends(class1, class2, coerce, test, 
replace, by, classDef1 = classDef,  
R>  setIs("trackMultiCurve", "trackCurve",
+test = function(obj) {ncol(slot(obj, "y")) == 1},
+coerce = function(obj) {
+   new("trackCurve",
+   x = slot(obj, "x"),
+   y = as.numeric(slot(obj,"y")),
+   smooth = as.numeric(slot(obj, "smooth")))
+})
Warning message:
there is no automatic definition for as(object, "trackCurve") <- value when 
object has class "trackMultiCurve" and no 'replace' argument was supplied; 
replacement will be an error in: makeExtends(class1, class2, coerce, test, 
replace, by, classDef1 = classDef,  
R> version
 _
platform i486-pc-linux-gnu
arch i486 
os   linux-gnu
system   i486, linux-gnu  
status
major2
minor2.0  
year 2005 
month10   
day  06   
svn rev  35749
language R


Thanks in advance,

-- 
Sebastian P. Luque

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] failure in `setClass' examples

2005-11-22 Thread John Chambers
There's nothing bad happening, and we should remove the setIs() example 
from the setClass() documentation.

If you run example(setIs), you will see a slightly different version of 
the same call to setIs(), but one that does not generate the warning 
(because it includes the argument replace= to setIs()). Comparing the 
two calls and looking at the documentation for setIs should explain 
where the warning comes from.  But in any case, nothing to worry about.

John Chambers.

Sebastian Luque wrote:
> Hello,
> 
> Below is what I got running the examples from `setClass'.  Could somebody
> please help explain why the last `setIs' call is returning the warning and
> whether this is expected?
> 
> 
> R>  setClass("track",
> +   representation(x="numeric", y="numeric"))
> [1] "track"
> R>  setClass("trackCurve",
> +   representation("track", smooth = "numeric"))
> [1] "trackCurve"
> R>  setClass("trackMultiCurve",
> +   representation(x="numeric", y="matrix", smooth="matrix"),
> +   prototype = list(x=numeric(), y=matrix(0,0,0),
> +smooth= matrix(0,0,0)))
> [1] "trackMultiCurve"
> R>  try(setIs("trackMultiCurve", "trackCurve",
> +  test = function(obj) {ncol(slot(obj, "y")) == 1}))
> Warning message:
> there is no automatic definition for as(object, "trackCurve") <- value when 
> object has class "trackMultiCurve" and no 'replace' argument was supplied; 
> replacement will be an error in: makeExtends(class1, class2, coerce, test, 
> replace, by, classDef1 = classDef,  
> R>  setIs("trackMultiCurve", "trackCurve",
> +test = function(obj) {ncol(slot(obj, "y")) == 1},
> +coerce = function(obj) {
> +   new("trackCurve",
> +   x = slot(obj, "x"),
> +   y = as.numeric(slot(obj,"y")),
> +   smooth = as.numeric(slot(obj, "smooth")))
> +})
> Warning message:
> there is no automatic definition for as(object, "trackCurve") <- value when 
> object has class "trackMultiCurve" and no 'replace' argument was supplied; 
> replacement will be an error in: makeExtends(class1, class2, coerce, test, 
> replace, by, classDef1 = classDef,  
> R> version
>  _
> platform i486-pc-linux-gnu
> arch i486 
> os   linux-gnu
> system   i486, linux-gnu  
> status
> major2
> minor2.0  
> year 2005 
> month10   
> day  06   
> svn rev  35749
> language R
> 
> 
> Thanks in advance,
>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] failure in `setClass' examples

2005-11-22 Thread Sebastian Luque
John Chambers <[EMAIL PROTECTED]> wrote:
> There's nothing bad happening, and we should remove the setIs() example
> from the setClass() documentation.

> If you run example(setIs), you will see a slightly different version of
> the same call to setIs(), but one that does not generate the warning 
> (because it includes the argument replace= to setIs()). Comparing the 
> two calls and looking at the documentation for setIs should explain 
> where the warning comes from.  But in any case, nothing to worry about.

Thank you, things are much clearer after reading the setIs()
documentation.


Cheers,

-- 
Sebastian P. Luque

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Inaccurate documentation for qr.R and qr.Q (PR#8347)

2005-11-22 Thread sims
This is a multi-part message in MIME format.
--060805080907030400090708
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

The documentation in QR.Auxiliaries {base} states

|qr.Q| returns part or all of *Q*, the order-nrow(X) orthogonal 
(unitary) transformation represented by |qr|. If |complete| is |TRUE|, 
*Q* has |nrow(X)| columns. If |complete| is |FALSE|, *Q* has |ncol(X)| 
columns. When |Dvec| is specified, each column of *Q* is multiplied by 
the corresponding value in |Dvec|.
|qr.R| returns *R*, the upper triangular matrix such that |X == Q %*% R|.

This last statement is true if there has been no pivoting, but if the 
LAPACK=TRUE option is turned on or the x matrix is complex, there is 
likely to be pivoting, and in that case Q %*% R is X with columns 
reordered by the pivot.  qr.X does return the original x matrix in 
either case, but a naive user who uses R alone (e.g. thinking that 
solve(R,crossprod(Q ,y)) will give ols estimates) could be misled.

Example:

 > x <- matrix(c(1,2,3,3,6,8),ncol=2)
 > qrlin <- qr(x)
 > qrla <- qr(x,LAPACK=TRUE)
 > qr.Q(qrlin) %*% qr.R(qrlin)
 [,1] [,2]
[1,]13
[2,]26
[3,]38
 > qr.Q(qrla) %*% qr.R(qrla)
 [,1] [,2]
[1,]31
[2,]62
[3,]83
 > qr.Q(qrla) %*% qr.R(qrla)[,qrla$pivot]
 [,1] [,2]
[1,]13
[2,]26
[3,]38

--060805080907030400090708
Content-Type: text/x-vcard; charset=utf-8;
 name="sims.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="sims.vcf"

begin:vcard
fn:Chris Sims
n:Sims;Chris
org:Princeton University;Department of Economics
adr:;;Fisher Hall;Princeton;NJ;08544-1021;USA
email;internet:[EMAIL PROTECTED]
tel;work:609 258 4033
tel;fax:609 258 6419
x-mozilla-html:FALSE
url:http://www.princeton.edu/~sims
version:2.1
end:vcard


--060805080907030400090708--

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] winMenuAdd

2005-11-22 Thread Martin Morgan
The following

winMenuAdd("X")
for (i in 1:20) winMenuAdd(paste("X",i, sep="/"))

generates an (incorrect) error after adding 12 menu items:

Error in winMenuAdd(menuname, NULL, NULL) : 
unable to add menu (base menu does not exist)

More elaborate examples (e.g., adding menu items to each menu) create
other errors (e.g., "Only 16 menus are allowed"), and the original
example (at
https://stat.ethz.ch/pipermail/bioconductor/2005-November/011010.html)
crashes with SIGSEGV in rui.c:1389. I think the basic problem is that
there is a hard-coded limit of 16 menus. The limit is reached in
Bioconductor, as packages add vignettes.

R version 2.2.0, 2005-11-21, i386-pc-mingw32 

attached base packages:
[1] "methods"   "stats" "graphics"  "grDevices" "utils" "datasets" 
[7] "base" 


-- 
Martin Morgan

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] ANN: R for Bioinformatics (advanced R programming) Course

2005-11-22 Thread Seth Falcon
Robert and I will be teaching an advanced R programming course January
18-20, 2006 in Seattle.

Learn more here: http://bioconductor.org/rforbioc

The topics we plan to cover include:
  * Lexical Scope
  * Vectorization
  * Object Oriented Programming (S3 and S4)
  * Writing R packages
  * Database interfaces (DBI, ODBC)
  * Interfacing to C (.C/.Call)

Best,

+ seth

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel