Re: [Rd] MacOSX 10.4.11 update breaks tests/lapack.R (R 2.6.0)? (PR#10454)

2007-11-23 Thread Simon Urbanek
René,

On Nov 23, 2007, at 6:00 AM, [EMAIL PROTECTED] wrote:

> It seems the recent Mac OS X 10.4.11 update installed a new  
> libBLAS.dylib in the Accelerate framework which either contains a  
> bug itself or exposes a bug somewhere in R's lapack code on the  
> PowerPC G4 and G5.
> My build of R 2.6.0 executed the tests/lapack.R code succesfully  
> when I upgraded when 2.6.0 was released. After the OS update, it  
> now crashes. This happens both with the version I built using  
> Apple's gcc 4.0.1 and gfortran 4.2.2, and with the version built  
> completely with gcc 4.2.2 .
>

this is almost certainly a problem with the complex ABI (i.e. the  
Fortran compiler and vecLib/ALTAS disagree). Normally R detects  
complex ABI mismatch and either enables a work-around (vecLib) or  
disables BLAS (others). If the ABI changed between versions, you'll  
have to re-compile R. If the problem still persists after a re- 
compile, please send me your config.log.

Cheers,
Simon


>> R
>
> R version 2.6.0 (2007-10-03)
> Copyright (C) 2007 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
> ##> source("R-2.6.0/tests/lapack.R", echo=TRUE, verbose=TRUE)
> 'envir' chosen:
> encoding = "native.enc" chosen
> --> parsed 40 expressions; now eval(.)ing them:
>
> eval(expression_nr. 1 )
>  =
>
> ##> ## tests of R functions based on the lapack module
> ##>
> ##> options(digits=4)
> curr.fun: symbol options
>  .. after 'expression(options(digits=4))'
>
> 
>
> ##> sm[] <- as.complex(sm)
> curr.fun: symbol <-
>  .. after 'expression(sm[] <- as.complex(sm))'
>
> eval(expression_nr. 35 )
>  =
>
> ##> Ceigenok(sm, eigen(sm))
>
>  *** caught bus error ***
> address 0x1, cause 'invalid alignment'
>
> Traceback:
>  1: .Call("La_rs_cmplx", x, only.values, PACKAGE = "base")
>  2: eigen(sm)
>  3: apply(A, 2, function(x) x * sign(Re(x[1])))
>  4: fixsign(E$vectors)
>  5: print(fixsign(E$vectors))
>  6: Ceigenok(sm, eigen(sm))
>  7: eval.with.vis(expr, envir, enclos)
>  8: eval.with.vis(ei, envir)
>  9: source("~/cworks/new/R-2.6.0/tests/lapack.R", echo = TRUE,  
> verbose = TRUE)
>
> Possible actions:
> 1: abort (with core dump, if enabled)
> 2: normal R exit
> 3: exit R without saving workspace
> 4: exit R saving workspace
>
> *** OS X Crash report:
> Date/Time:  2007-11-23 11:19:19.135 +0100
> OS Version: 10.4.11 (Build 8S165)
> Report Version: 4
>
> Command: R
> Path:/Library/Frameworks/R.framework/Resources/bin/exec/R
> Parent:  tcsh [2437]
>
> Version: ??? (???)
>
> PID:3167
> Thread: 0
>
> Exception:  EXC_BAD_ACCESS (0x0001)
> Codes:  KERN_PROTECTION_FAILURE (0x0002) at 0x0001
>
> Thread 0 Crashed:
> 0   libBLAS.dylib 0x920fc374 atl_f77wrap_zdotc__ + 80
> 1   libBLAS.dylib 0x920f7864 zdotc_ + 60
> 2   libRlapack.dylib  0x013701a0 zhetd2_ + 960
> 3   libRlapack.dylib  0x0136fcdc zhetrd_ + 1900
> 4   libRlapack.dylib  0x01370ad8 zheev_ + 1016
> 5   lapack.so 0x010a4038 modLa_rs_cmplx + 392
> 6   libR.dylib0x003c99e8 La_rs_cmplx + 72
> 7   libR.dylib0x00372380 do_dotcall + 16864
> 8   libR.dylib0x003a170c Rf_eval + 1804
> 9   libR.dylib0x003a14dc Rf_eval + 1244
> 10  libR.dylib0x003a45f4 do_set + 980
> 11  libR.dylib0x003a14dc Rf_eval + 1244
> 12  libR.dylib0x003a2b08 do_begin + 104
> 13  libR.dylib0x003a14dc Rf_eval + 1244
> 14  libR.dylib0x003a14dc Rf_eval + 1244
> 15  libR.dylib0x003a2b08 do_begin + 104
> 16  libR.dylib0x003a14dc Rf_eval + 1244
> 17  libR.dylib0x003a14dc Rf_eval + 1244
> 18  libR.dylib0x003a2b08 do_begin + 104
> 19  libR.dylib0x003a14dc Rf_eval + 1244
> 20  libR.dylib0x003a4f58 Rf_applyClosure + 728
> 21  libR.dylib0x003a13f0 Rf_eval + 1008
> 22  libR.dylib0x003a62c8 forcePromise + 184
> 23  libR.dylib0x003a12c8 Rf_eval + 712
> 24  libR.dylib0x003a1650 Rf_eval + 1616
> 25  libR.dylib0x003a2714 Rf_DispatchOrEval + 244
> 26  libR.dylib0x0049d190 do_subset3 + 384
> 27  libR.dylib0x003a14dc Rf_eval + 1244
> 28  libR.dylib0x003a62c8 forcePromise + 184
> 29  libR.dylib0x003a12c8 Rf_eval + 712
> 30  libR.dylib0x003a1650 Rf_eval + 1616
> 31  libR.dylib0x003a62c8 forcePromise + 184
> 32  libR.dylib0x003a12c8 Rf_eval + 712
> 33  libR.dylib0x003a1650 Rf_eval + 1616
> 34  libR.dylib 

Re: [Rd] package gsl assumes incorrect gcc version during install (PR#10456)

2007-11-23 Thread edd

On 22 November 2007 at 20:00, [EMAIL PROTECTED] wrote:
| Full_Name: Levi Waldron
| Version: 2.5.1
| OS: Ubuntu Gutsy
| Submission from: (NULL) (206.248.157.88)
| 
| 
| I installed libgsl0-dev then tried to install the gsl cran package,
| unsuccessfully (see output below).  As a workaround I created a symbolic link 
to
| /usr/bin/gcc-4.2, ie:
| 
| sudo ln -s /usr/bin/gcc-4.1 /usr/bin/gcc-4.2

I would strongly advise not to do that. 

| The correct behavior of the gsl package should be to use the executable
| '/usr/bin/gcc' which is already linked to the current gcc version.

No. You misunderstand. It has nothing to do with the package. 

When R is built, it 'stores' its compiler version etc in the file
Makeconf. The Debian (and hence Ubuntu) packages store that file for you as
/etc/R/Makeconf via a link; the file is as always in $RHOME/etc/Makeconf.

This file defines a variable CC for the compiler. All you need to do is to
set it back to 'gcc' from its value 'gcc-4.2'.  

This really is a local admin issue (ie you need to fix it) and not a problem 
with R, or gsl.

If you got R from Ubuntu, file a bug report _with Ubuntu_ as they seem to
have forgotten to switch from gcc-4.2 (which we use in Debian as default) to
gcc-4.1 (which is Ubuntu's default).
  
| > install.packages("gsl",dependencies=T) 
| Warning in install.packages("gsl", dependencies = T) : 
|  argument 'lib' is missing: using '/usr/local/lib/R/site-library'
| --- Please select a CRAN mirror for use in this session ---
| Loading Tcl/Tk interface ... done
| trying URL 'http://probability.ca/cran/src/contrib/gsl_1.8-8.tar.gz'
| Content type 'application/x-tar' length 59084 bytes
| opened URL
| ==
| downloaded 57Kb
| 
| * Installing *source* package 'gsl' ...
| checking for gcc... gcc
| checking for C compiler default output... a.out
| checking whether the C compiler works... yes
| checking whether we are cross compiling... no
| checking for suffix of executables... 
| checking for suffix of object files... o
| checking whether we are using the GNU C compiler... yes
| checking whether gcc accepts -g... yes
| checking for gcc option to accept ANSI C... none needed
| checking for gsl_sf_airy_Ai_e in -lgsl... yes
| checking how to run the C preprocessor... gcc -E
| checking for egrep... grep -E
| checking for ANSI C header files... yes
| checking for sys/types.h... yes
| checking for sys/stat.h... yes
| checking for stdlib.h... yes
| checking for string.h... yes
| checking for memory.h... yes
| checking for strings.h... yes
| checking for inttypes.h... yes
| checking for stdint.h... yes
| checking for unistd.h... yes
| checking gsl/gsl_version.h usability... yes
| checking gsl/gsl_version.h presence... yes
| checking for gsl/gsl_version.h... yes
| checking if GSL version >= 1.8... yes
| configure: creating ./config.status
| ** libs
| gcc-4.2 -std=gnu99 -I/usr/share/R/include -I/usr/share/R/include  -fpic  
-g
| -O2 -c airy.c -o airy.o
| /bin/bash: gcc-4.2: command not found
| make: *** [airy.o] Error 127
| chmod: cannot access `/usr/local/lib/R/site-library/gsl/libs/*': No such file 
or
| directory
| ERROR: compilation failed for package 'gsl'
| ** Removing '/usr/local/lib/R/site-library/gsl'
| 
| The downloaded packages are in
| /tmp/RtmpW60zFl/downloaded_packages
| Warning message:
| installation of package 'gsl' had non-zero exit status in:
| install.packages("gsl", dependencies = T) 
| 
| > version
|_   
| platform   i486-pc-linux-gnu   
| arch   i486
| os linux-gnu   
| system i486, linux-gnu 
| status 
| major  2   
| minor  5.1 
| year   2007
| month  06  
| day27  
| svn rev42083   
| language   R   
| version.string R version 2.5.1 (2007-06-27)

Also note that CRAN has prebuilt versions of the current R release, ie 2.6.0,
for Ubuntu Gutsy, see $CRAN/bin/linux/ubuntu

The CRAN version of R for Ubuntu is quite possibly of better quality than the
distro's version.

Dirk

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

-- 
Three out of two people have difficulties with fractions.

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


Re: [Rd] package gsl assumes incorrect gcc version during install (PR#10451)

2007-11-23 Thread Dirk Eddelbuettel

On 22 November 2007 at 20:00, [EMAIL PROTECTED] wrote:
| Full_Name: Levi Waldron
| Version: 2.5.1
| OS: Ubuntu Gutsy
| Submission from: (NULL) (206.248.157.88)
| 
| 
| I installed libgsl0-dev then tried to install the gsl cran package,
| unsuccessfully (see output below).  As a workaround I created a symbolic link 
to
| /usr/bin/gcc-4.2, ie:
| 
| sudo ln -s /usr/bin/gcc-4.1 /usr/bin/gcc-4.2

I would strongly advise not to do that. 

| The correct behavior of the gsl package should be to use the executable
| '/usr/bin/gcc' which is already linked to the current gcc version.

No. You misunderstand. It has nothing to do with the package. 

When R is built, it 'stores' its compiler version etc in the file
Makeconf. The Debian (and hence Ubuntu) packages store that file for you as
/etc/R/Makeconf via a link; the file is as always in $RHOME/etc/Makeconf.

This file defines a variable CC for the compiler. All you need to do is to
set it back to 'gcc' from its value 'gcc-4.2'.  

This really is a local admin issue (ie you need to fix it) and not a problem 
with R, or gsl.

If you got R from Ubuntu, file a bug report _with Ubuntu_ as they seem to
have forgotten to switch from gcc-4.2 (which we use in Debian as default) to
gcc-4.1 (which is Ubuntu's default).
  
| > install.packages("gsl",dependencies=T) 
| Warning in install.packages("gsl", dependencies = T) : 
|  argument 'lib' is missing: using '/usr/local/lib/R/site-library'
| --- Please select a CRAN mirror for use in this session ---
| Loading Tcl/Tk interface ... done
| trying URL 'http://probability.ca/cran/src/contrib/gsl_1.8-8.tar.gz'
| Content type 'application/x-tar' length 59084 bytes
| opened URL
| ==
| downloaded 57Kb
| 
| * Installing *source* package 'gsl' ...
| checking for gcc... gcc
| checking for C compiler default output... a.out
| checking whether the C compiler works... yes
| checking whether we are cross compiling... no
| checking for suffix of executables... 
| checking for suffix of object files... o
| checking whether we are using the GNU C compiler... yes
| checking whether gcc accepts -g... yes
| checking for gcc option to accept ANSI C... none needed
| checking for gsl_sf_airy_Ai_e in -lgsl... yes
| checking how to run the C preprocessor... gcc -E
| checking for egrep... grep -E
| checking for ANSI C header files... yes
| checking for sys/types.h... yes
| checking for sys/stat.h... yes
| checking for stdlib.h... yes
| checking for string.h... yes
| checking for memory.h... yes
| checking for strings.h... yes
| checking for inttypes.h... yes
| checking for stdint.h... yes
| checking for unistd.h... yes
| checking gsl/gsl_version.h usability... yes
| checking gsl/gsl_version.h presence... yes
| checking for gsl/gsl_version.h... yes
| checking if GSL version >= 1.8... yes
| configure: creating ./config.status
| ** libs
| gcc-4.2 -std=gnu99 -I/usr/share/R/include -I/usr/share/R/include  -fpic  
-g
| -O2 -c airy.c -o airy.o
| /bin/bash: gcc-4.2: command not found
| make: *** [airy.o] Error 127
| chmod: cannot access `/usr/local/lib/R/site-library/gsl/libs/*': No such file 
or
| directory
| ERROR: compilation failed for package 'gsl'
| ** Removing '/usr/local/lib/R/site-library/gsl'
| 
| The downloaded packages are in
| /tmp/RtmpW60zFl/downloaded_packages
| Warning message:
| installation of package 'gsl' had non-zero exit status in:
| install.packages("gsl", dependencies = T) 
| 
| > version
|_   
| platform   i486-pc-linux-gnu   
| arch   i486
| os linux-gnu   
| system i486, linux-gnu 
| status 
| major  2   
| minor  5.1 
| year   2007
| month  06  
| day27  
| svn rev42083   
| language   R   
| version.string R version 2.5.1 (2007-06-27)

Also note that CRAN has prebuilt versions of the current R release, ie 2.6.0,
for Ubuntu Gutsy, see $CRAN/bin/linux/ubuntu

The CRAN version of R for Ubuntu is quite possibly of better quality than the
distro's version.

Dirk

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

-- 
Three out of two people have difficulties with fractions.

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


[Rd] Bug in pacf -- Proposed patch

2007-11-23 Thread Simone Giannerini
Dear all,

following the thread

http://tolstoy.newcastle.edu.au/R/e2/devel/07/09/4338.html

regarding the bug in the partial autocorrelation function for
multivariate time series.
I have prepared a web page with patches and relevant information.

http://www2.stat.unibo.it/giannerini/R/pacf.htm

Please do not hesitate to contact me for further clarifications

regards

Simone

-- 
__

Simone Giannerini
Dipartimento di Scienze Statistiche "Paolo Fortunati"
Universita' di Bologna
Via delle belle arti 41 - 40126  Bologna,  ITALY
Tel: +39 051 2098262  Fax: +39 051 232153
http://www2.stat.unibo.it/giannerini/

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


[Rd] package gsl assumes incorrect gcc version during install (PR#10451)

2007-11-23 Thread leviwaldron
Full_Name: Levi Waldron
Version: 2.5.1
OS: Ubuntu Gutsy
Submission from: (NULL) (206.248.157.88)


I installed libgsl0-dev then tried to install the gsl cran package,
unsuccessfully (see output below).  As a workaround I created a symbolic link to
/usr/bin/gcc-4.2, ie:

sudo ln -s /usr/bin/gcc-4.1 /usr/bin/gcc-4.2

The correct behavior of the gsl package should be to use the executable
'/usr/bin/gcc' which is already linked to the current gcc version.


> install.packages("gsl",dependencies=T) 
Warning in install.packages("gsl", dependencies = T) : 
 argument 'lib' is missing: using '/usr/local/lib/R/site-library'
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
trying URL 'http://probability.ca/cran/src/contrib/gsl_1.8-8.tar.gz'
Content type 'application/x-tar' length 59084 bytes
opened URL
==
downloaded 57Kb

* Installing *source* package 'gsl' ...
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for gsl_sf_airy_Ai_e in -lgsl... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gsl/gsl_version.h usability... yes
checking gsl/gsl_version.h presence... yes
checking for gsl/gsl_version.h... yes
checking if GSL version >= 1.8... yes
configure: creating ./config.status
** libs
gcc-4.2 -std=gnu99 -I/usr/share/R/include -I/usr/share/R/include  -fpic  -g
-O2 -c airy.c -o airy.o
/bin/bash: gcc-4.2: command not found
make: *** [airy.o] Error 127
chmod: cannot access `/usr/local/lib/R/site-library/gsl/libs/*': No such file or
directory
ERROR: compilation failed for package 'gsl'
** Removing '/usr/local/lib/R/site-library/gsl'

The downloaded packages are in
/tmp/RtmpW60zFl/downloaded_packages
Warning message:
installation of package 'gsl' had non-zero exit status in:
install.packages("gsl", dependencies = T) 

> version
   _   
platform   i486-pc-linux-gnu   
arch   i486
os linux-gnu   
system i486, linux-gnu 
status 
major  2   
minor  5.1 
year   2007
month  06  
day27  
svn rev42083   
language   R   
version.string R version 2.5.1 (2007-06-27)
>

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


[Rd] bug in getGraphicsEvent (PR#10453)

2007-11-23 Thread twoutopias
Full_Name: Seth Roberts
Version: 2.6.0
OS: Windows XP
Submission from: (NULL) (71.139.162.236)


Using getGraphicsEvent produces stack imbalance warnings. This started after I
installed 2.6.0; it did not happen with 2.5.1. 

Running the example given in the user manual (retrieved via ?getGraphicsEvent)
produces the following errors:

Key <2>
Key <1>
Buttons  0  at  0.991317 0.9942029 
Warning: stack imbalance in 'getGraphicsEvent', 7 then 17
Warning: stack imbalance in '.Internal', 6 then 16
[1] "Done"

I wrote the following program:

function () 
{plot(1:5)
getGraphicsEvent(onKeybd=get.key)
}

get.key
function(key){key}

running the program, switching to the graphics window and typing "4" produced:

Waiting for input
Warning: stack imbalance in 'getGraphicsEvent', 13 then 14
Warning: stack imbalance in '.Internal', 12 then 13
Warning: stack imbalance in '{', 6 then 7
[1] "4"

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


[Rd] MacOSX 10.4.11 update breaks tests/lapack.R (R 2.6.0)? (PR#10454)

2007-11-23 Thread rjvbertin
Hello,

It seems the recent Mac OS X 10.4.11 update installed a new
libBLAS.dylib in the Accelerate framework which either contains a bug
itself or exposes a bug somewhere in R's lapack code on the PowerPC G4
and G5.
My build of R 2.6.0 executed the tests/lapack.R code succesfully when
I upgraded when 2.6.0 was released. After the OS update, it now
crashes. This happens both with the version I built using Apple's gcc
4.0.1 and gfortran 4.2.2, and with the version built completely with
gcc 4.2.2 .

> R

R version 2.6.0 (2007-10-03)
Copyright (C) 2007 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

##> source("R-2.6.0/tests/lapack.R", echo=TRUE, verbose=TRUE)
'envir' chosen:
encoding = "native.enc" chosen
--> parsed 40 expressions; now eval(.)ing them:

 eval(expression_nr. 1 )
 =

##> ## tests of R functions based on the lapack module
##>
##> options(digits=4)
curr.fun: symbol options
 .. after 'expression(options(digits=4))'



##> sm[] <- as.complex(sm)
curr.fun: symbol <-
 .. after 'expression(sm[] <- as.complex(sm))'

 eval(expression_nr. 35 )
 =

##> Ceigenok(sm, eigen(sm))

 *** caught bus error ***
address 0x1, cause 'invalid alignment'

Traceback:
 1: .Call("La_rs_cmplx", x, only.values, PACKAGE = "base")
 2: eigen(sm)
 3: apply(A, 2, function(x) x * sign(Re(x[1])))
 4: fixsign(E$vectors)
 5: print(fixsign(E$vectors))
 6: Ceigenok(sm, eigen(sm))
 7: eval.with.vis(expr, envir, enclos)
 8: eval.with.vis(ei, envir)
 9: source("~/cworks/new/R-2.6.0/tests/lapack.R", echo = TRUE, verbose = TRUE)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace

*** OS X Crash report:
Date/Time:  2007-11-23 11:19:19.135 +0100
OS Version: 10.4.11 (Build 8S165)
Report Version: 4

Command: R
Path:/Library/Frameworks/R.framework/Resources/bin/exec/R
Parent:  tcsh [2437]

Version: ??? (???)

PID:3167
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:  KERN_PROTECTION_FAILURE (0x0002) at 0x0001

Thread 0 Crashed:
0   libBLAS.dylib   0x920fc374 atl_f77wrap_zdotc__ + 80
1   libBLAS.dylib   0x920f7864 zdotc_ + 60
2   libRlapack.dylib0x013701a0 zhetd2_ + 960
3   libRlapack.dylib0x0136fcdc zhetrd_ + 1900
4   libRlapack.dylib0x01370ad8 zheev_ + 1016
5   lapack.so   0x010a4038 modLa_rs_cmplx + 392
6   libR.dylib  0x003c99e8 La_rs_cmplx + 72
7   libR.dylib  0x00372380 do_dotcall + 16864
8   libR.dylib  0x003a170c Rf_eval + 1804
9   libR.dylib  0x003a14dc Rf_eval + 1244
10  libR.dylib  0x003a45f4 do_set + 980
11  libR.dylib  0x003a14dc Rf_eval + 1244
12  libR.dylib  0x003a2b08 do_begin + 104
13  libR.dylib  0x003a14dc Rf_eval + 1244
14  libR.dylib  0x003a14dc Rf_eval + 1244
15  libR.dylib  0x003a2b08 do_begin + 104
16  libR.dylib  0x003a14dc Rf_eval + 1244
17  libR.dylib  0x003a14dc Rf_eval + 1244
18  libR.dylib  0x003a2b08 do_begin + 104
19  libR.dylib  0x003a14dc Rf_eval + 1244
20  libR.dylib  0x003a4f58 Rf_applyClosure + 728
21  libR.dylib  0x003a13f0 Rf_eval + 1008
22  libR.dylib  0x003a62c8 forcePromise + 184
23  libR.dylib  0x003a12c8 Rf_eval + 712
24  libR.dylib  0x003a1650 Rf_eval + 1616
25  libR.dylib  0x003a2714 Rf_DispatchOrEval + 244
26  libR.dylib  0x0049d190 do_subset3 + 384
27  libR.dylib  0x003a14dc Rf_eval + 1244
28  libR.dylib  0x003a62c8 forcePromise + 184
29  libR.dylib  0x003a12c8 Rf_eval + 712
30  libR.dylib  0x003a1650 Rf_eval + 1616
31  libR.dylib  0x003a62c8 forcePromise + 184
32  libR.dylib  0x003a12c8 Rf_eval + 712
33  libR.dylib  0x003a1650 Rf_eval + 1616
34  libR.dylib  0x003a2488 Rf_evalList + 168
35  libR.dylib  0x003a15a8 Rf_eval + 1448
36  libR.dylib  0x003a45f4 do_set + 980
37  libR.dylib  0x003a14dc Rf_eval + 1244
38  libR.dylib  0x003a2b08 do_begin + 104
39  libR.dylib  0x003a14dc Rf_eval + 1244
40  libR.dylib  0x003a4f58 Rf_applyClosure + 728
41  libR.dylib  0x003a13f0 Rf_eval + 1008
42  libR.dylib  0x003a3cdc applydefine + 60
43  libR.dylib  0x003a14dc Rf_eval + 1244
44  libR.dylib  0x003a2b08 do_begin + 104
45  libR.dylib  0x003a14dc Rf_eval + 1244
46  libR.dylib  0x003a4f5

[Rd] Bug in pacf -- Proposed patch (PR#10455)

2007-11-23 Thread sgiannerini
Dear all,

following the thread

http://tolstoy.newcastle.edu.au/R/e2/devel/07/09/4338.html

regarding the bug in the partial autocorrelation function for
multivariate time series.
I have prepared a web page with patches and relevant information.

http://www2.stat.unibo.it/giannerini/R/pacf.htm

Please do not hesitate to contact me for further clarifications

regards

Simone

-- 
__

Simone Giannerini
Dipartimento di Scienze Statistiche "Paolo Fortunati"
Universita' di Bologna
Via delle belle arti 41 - 40126  Bologna,  ITALY
Tel: +39 051 2098262  Fax: +39 051 232153
http://www2.stat.unibo.it/giannerini/

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


[Rd] Bug in package stats function ar() (PR#10459)

2007-11-23 Thread smckinney
Full_Name: Steven McKinney
Version: 2.6.0
OS: OS X
Submission from: (NULL) (142.103.207.10)



Function ar() in package "stats" is showing
a quirky bug.  Some calls to ar() run to
completion, others throw an error.

The bug is reproducible by several people on different
machines, however, the ar() function itself ends
up throwing the error sporadically.  Several calls to
ar() may be necessary to trip the error condition.

Code to reproduce:

x<-ts(c(-0.2052083,-0.3764986,-0.3762448,0.3740089,0.2737568,2.8235722,-1.7783313,0.2728676,-0.3273164),start=c(1978,3),frequency=4,end=c(1980,3))
# ar function
res.ar<-ar(x,aic=TRUE,demean=F)
# call "ar" again and 
res.ar<-ar(x,aic=TRUE,demean=F)


Example output:
(Note that on this attempt the first call to ar()
 tripped the error.)

> x<-ts(c(-0.2052083,-0.3764986,-0.3762448,0.3740089,0.2737568,2.8235722,-
+ 1.7783313,0.2728676,-0.3273164),start=c(1978,3),frequency=4,end=c(1980,3))
> 
> # ar function
> res.ar<-ar(x,aic=TRUE,demean=F)
Error in if (order > 0) coefs[order, 1:order] else numeric(0) : 
  missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In log(var.pred) : NaNs produced
2: In if (order > 0) coefs[order, 1:order] else numeric(0) :
  the condition has length > 1 and only the first element will be used
> 
> # call "ar" again and 
> res.ar<-ar(x,aic=TRUE,demean=F)
> x
   Qtr1   Qtr2   Qtr3   Qtr4
1978   -0.2052083 -0.3764986
1979 -0.3762448  0.3740089  0.2737568  2.8235722
1980 -1.7783313  0.2728676 -0.3273164   
> res.ar<-ar(x,aic=TRUE,demean=F)
> res.ar$resid
   Qtr1   Qtr2   Qtr3   Qtr4
1978   -0.2052083 -0.3764986
1979 -0.3762448  0.3740089  0.2737568  2.8235722
1980 -1.7783313  0.2728676 -0.3273164   
> res.ar<-ar(x,aic=TRUE,demean=F)
> res.ar$resid
   Qtr1   Qtr2   Qtr3   Qtr4
1978   -0.2052083 -0.3764986
1979 -0.3762448  0.3740089  0.2737568  2.8235722
1980 -1.7783313  0.2728676 -0.3273164   
> res.ar<-ar(x,aic=TRUE,demean=F)
> res.ar<-ar(x,aic=TRUE,demean=F)
> res.ar<-ar(x,aic=TRUE,demean=F)
> res.ar<-ar(x,aic=TRUE,demean=F)
> res.ar<-ar(x,aic=TRUE,demean=F)
> res.ar<-ar(x,aic=TRUE,demean=F)
> res.ar<-ar(x,aic=TRUE,demean=F)
Error in if (order > 0) coefs[order, 1:order] else numeric(0) : 
  missing value where TRUE/FALSE needed
In addition: Warning message:
In if (order > 0) coefs[order, 1:order] else numeric(0) :
  the condition has length > 1 and only the first element will be used
> res.ar<-ar(x,aic=TRUE,demean=F)
Error in if (order > 0) coefs[order, 1:order] else numeric(0) : 
  missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In log(var.pred) : NaNs produced
2: In if (order > 0) coefs[order, 1:order] else numeric(0) :
  the condition has length > 1 and only the first element will be used
> res.ar<-ar(x,aic=TRUE,demean=F)
> res.ar<-ar(x,aic=TRUE,demean=F)
> sessionInfo()
R version 2.6.0 (2007-10-03) 
powerpc-apple-darwin8.10.1 

locale:
C

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


###-

Also seen in R 2.5.0:

> x<-ts(c(-0.2052083,-0.3764986,-0.3762448,0.3740089,0.2737568,2.8235722,-1.7783313,0.2728676,-0.3273164),start=c(1978,3),frequency=4,end=c(1980,3))
> # ar function
> res.ar<-ar(x,aic=TRUE,demean=F)
> # call "ar" again and 
> res.ar<-ar(x,aic=TRUE,demean=F)
> res.ar<-ar(x,aic=TRUE,demean=F)
> res.ar<-ar(x,aic=TRUE,demean=F)
> res.ar<-ar(x,aic=TRUE,demean=F)
> res.ar<-ar(x,aic=TRUE,demean=F)
Error in if (order > 0) coefs[order, 1:order] else numeric(0) : 
missing value where TRUE/FALSE needed
In addition: Warning message:
the condition has length > 1 and only the first element will be used in: if
(order > 0) coefs[order, 1:order] else numeric(0) 
> sessionInfo()
R version 2.5.0 (2007-04-23) 
x86_64-redhat-linux-gnu 

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_P
APER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

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

###-

However, if I lengthen the input vector 

x<-ts(c(-0.2052083,-0.3764986,-0.3762448,0.3740089,0.2737568,2.8235722,-1.7783313,0.2728676,-0.3273164,
  
-0.2052083,-0.3764986,-0.3762448,0.3740089,0.2737568,2.8235722,-1.7783313,0.2728676,-0.3273164),start=c(1978,3),frequency=4,end=c(1982,3))

I can not trip the error, so perhaps it is due to the short length of
the user's input data.



###-

Nov 23, 2007 original email from R-help

[R] help please


Dears Sirs

During my computational work