Re: [Rd] qbinom returns NaN

2005-11-23 Thread Prof Brian Ripley
This is a very simple change at C level: the !R_FINITE(p) test is incorrect for log_p != 0. Changed now. On Wed, 23 Nov 2005, Spencer Graves wrote: > Hi, All: > > For most but not all cases, qbinom is the inverse of pbinom. > Consider the following example, which generates an exception

Re: [Rd] Infinite recursion in S3 methods crashes R on windows (related to PR#8203?)

2005-11-23 Thread Prof Brian Ripley
On Thu, 24 Nov 2005, Rich FitzJohn wrote: > Hi, > > Infinite recursion in S3 methods seem to crash R on Windows 2000 (R > terminating with the ("Rgui.exe has generated errors...") message, > rather than throwing an error. This happens with both Rgui and Rterm. > > The following toy example trigge

Re: [Rd] x[1,], x[1,,], x[1,,,], ...

2005-11-23 Thread Tony Plate
Henrik Bengtsson wrote: > Hi, thanks everyone. > > Some comments below: > > Peter Dalgaard wrote: > >>Henrik Bengtsson <[EMAIL PROTECTED]> writes: >> >> >> >>>Hi, >>> >>>is there a function in R already doing what I try to do below: >>> >>># Let 'x' be an array with *any* number of dimensions (>

Re: [Rd] x[1,], x[1,,], x[1,,,], ...

2005-11-23 Thread Henrik Bengtsson
Hi, thanks everyone. Some comments below: Peter Dalgaard wrote: > Henrik Bengtsson <[EMAIL PROTECTED]> writes: > > >>Hi, >> >>is there a function in R already doing what I try to do below: >> >># Let 'x' be an array with *any* number of dimensions (>=1). >>x <- array(1:24, dim=c(2,2,3,2)) >>...

Re: [Rd] Infinite recursion in S3 methods crashes R on windows (related to PR#8203?)

2005-11-23 Thread Henrik Bengtsson
Hi, trying the same on WinXP I get :R 2.1.1 Patched (2005-09-19) > myf(1) Error: protect(): protection stack overflow R 2.2.0 Patched (2005-11-21 r36410): > myf(1) Error: evaluation nested too deeply: infinite recursion / options(expressions=)? > options(expressions=5) > myf(1) Error: pr

Re: [Rd] Makefiles and other customization

2005-11-23 Thread Ross Boylan
On Wed, 2005-11-23 at 15:47 -0800, Kasper Daniel Hansen wrote: > Well you can have a look at etc/Makeconf. I have had some troubles > understanding the make process myself (which probably reveals I am > not a make guru), but it really depends on what you want to > accomplish - and from a cert

Re: [Rd] Makefiles and other customization

2005-11-23 Thread Kasper Daniel Hansen
Well you can have a look at etc/Makeconf. I have had some troubles understanding the make process myself (which probably reveals I am not a make guru), but it really depends on what you want to accomplish - and from a certain perspective it is all documented in the sources. I think you nee

[Rd] Makefiles and other customization

2005-11-23 Thread Ross Boylan
Writing R Extensions mentions that a package developer can provide a Makefile, but gives very little information about what should be in it. It says there must be a clean target, and later on there's mention of $(SHLIB): $(OBJECTS) $(SHLIB_LINK) -o $@ $(OBJECTS) $(ALL_LIBS) (in t

[Rd] qbinom returns NaN

2005-11-23 Thread Spencer Graves
Hi, All: For most but not all cases, qbinom is the inverse of pbinom. Consider the following example, which generates an exception: > (pb01 <- pbinom(0:1, 1, .5, log=T, lower.tail=FALSE)) [1] -0.6931472 -Inf Since "lower.tail=FALSE", Pr{X>1} = 0 in this context, and l

[Rd] Infinite recursion in S3 methods crashes R on windows (related to PR#8203?)

2005-11-23 Thread Rich FitzJohn
Hi, Infinite recursion in S3 methods seem to crash R on Windows 2000 (R terminating with the ("Rgui.exe has generated errors...") message, rather than throwing an error. This happens with both Rgui and Rterm. The following toy example triggers this: myf <- function(x, ...) UseMethod("myf") my

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

2005-11-23 Thread Kurt Hornik
> Prof Brian Ripley writes: > I've some playing with the Intel compilers, currently only on ia32. As > far as I can see Intel provides compilers for only two OSes and on 50% of > those -fPIC is wrong so I do think this is really Linux-specific. > I have put in a Linux-specific change to set

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

2005-11-23 Thread Prof Brian Ripley
I was somewhat more successful testing the Intel EM64T compilers (on an Opteron). The masquerading as gcc means the default for CFLAGS is "-g -O2" which again is problematic: I had to include -mp in all the compiler flags to ensure that IEC60059 arithmetic was used. After all that, the Intel c

Re: [Rd] winMenuAdd

2005-11-23 Thread Seth Falcon
On 23 Nov 2005, [EMAIL PROTECTED] wrote: > I can see no change in the relevant code since 2.2.0 and the release > version of 2.2.0 does this for me. > > It seems to be a long-standard error in rui.c that only 10 menus are > allocated but 16 are tested for. Would it be possible for the allocation

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

2005-11-23 Thread Prof Brian Ripley
I've some playing with the Intel compilers, currently only on ia32. As far as I can see Intel provides compilers for only two OSes and on 50% of those -fPIC is wrong so I do think this is really Linux-specific. I have put in a Linux-specific change to set FPICFLAGS, but that is the least of the

Re: [Rd] x[1,], x[1,,], x[1,,,], ...

2005-11-23 Thread Liaw, Andy
I suppose one can make use of slice.index(): > array(x[slice.index(x, 1) == 1], dim(x)[-1]) [,1] [,2] [1,]1 13 [2,]5 17 [3,]9 21 Andy > From: Henrik Bengtsson > > Hi, > > is there a function in R already doing what I try to do below: > > # Let 'x' be an array with *any

Re: [Rd] x[1,], x[1,,], x[1,,,], ...

2005-11-23 Thread Peter Dalgaard
Henrik Bengtsson <[EMAIL PROTECTED]> writes: > Hi, > > is there a function in R already doing what I try to do below: > > # Let 'x' be an array with *any* number of dimensions (>=1). > x <- array(1:24, dim=c(2,2,3,2)) > ... > x <- array(1:24, dim=c(4,3,2)) > > i <- 2:3 > > ndim <- length(dim(x

Re: [Rd] winMenuAdd

2005-11-23 Thread Prof Brian Ripley
I can see no change in the relevant code since 2.2.0 and the release version of 2.2.0 does this for me. It seems to be a long-standard error in rui.c that only 10 menus are allocated but 16 are tested for. On Wed, 23 Nov 2005, Uwe Ligges wrote: > Martin Morgan wrote: > >> The following >> >> w

Re: [Rd] x[1,], x[1,,], x[1,,,], ...

2005-11-23 Thread Patrick Burns
You can look at the definition of 'corner' in the public domain area of the Burns Statistics website. It uses 'do.call' on '[' to achieve (sort of) what you want. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide for the Unwilling S User"

[Rd] nls and weigthing the fit

2005-11-23 Thread Joerg van den Hoff
hi everybody, which each release I hope that the section "weights: an optional numeric vector of (fixed) weights. When present, the objective function is weighted least squares. _not yet implemented_" in the help page of 'nls' is missing the last sentence. are their any p

[Rd] x[1,], x[1,,], x[1,,,], ...

2005-11-23 Thread Henrik Bengtsson
Hi, is there a function in R already doing what I try to do below: # Let 'x' be an array with *any* number of dimensions (>=1). x <- array(1:24, dim=c(2,2,3,2)) ... x <- array(1:24, dim=c(4,3,2)) i <- 2:3 ndim <- length(dim(x)) if (ndim == 1) y <- x[i] else if (ndim == 2) y <- x[i,] else

Re: [Rd] problem with \eqn (PR#8322)

2005-11-23 Thread Ross Boylan
On Mon, 2005-11-21 at 10:27 +, Hin-Tak Leung wrote: > Kurt Hornik wrote: > > > Definitely a problem in Rdconv. > > > > E.g., > > > > $ cat foo.Rd > > \description{ > > \eqn{{A}}{B} > > } > > [EMAIL PROTECTED]:~/tmp$ R-d CMD Rdconv -t latex foo.Rd | grep eqn > > \eqn{{A}}{A}{{B} > > > > s

Re: [Rd] problem with \eqn (PR#8322)

2005-11-23 Thread Hin-Tak Leung
Ross Boylan wrote: > On Mon, 2005-11-21 at 10:27 +, Hin-Tak Leung wrote: > >>Kurt Hornik wrote: >> >> >>>Definitely a problem in Rdconv. >>> >>>E.g., >>> >>>$ cat foo.Rd >>>\description{ >>> \eqn{{A}}{B} >>>} >>>[EMAIL PROTECTED]:~/tmp$ R-d CMD Rdconv -t latex foo.Rd | grep eqn >>>\eqn{{A}}{

Re: [Rd] winMenuAdd

2005-11-23 Thread Uwe Ligges
Martin Morgan wrote: > 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 elaborat

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

2005-11-23 Thread Prof Brian Ripley
On Tue, 22 Nov 2005, Liaw, Andy wrote: > 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