Re: [Rd] Issue with c++ .C call

2006-01-10 Thread Thomas Lumley
On Tue, 10 Jan 2006, Sean Davis wrote: > > Thanks, Thomas. That did fix the initialization issue (or apparent one). > Unfortunately, the reason that I started debugging was for segmentation > faults, which have not gone away. However, it now looks like the problem is > internal to the C++ code a

Re: [Rd] Interfacing with user in R

2006-01-10 Thread Simon Urbanek
On Jan 10, 2006, at 4:34 PM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: > I am new in R programming (my question may sound trivial to you): > is there any way to ask the user to enter a string within an R > process, say a filename, make R to recognise it and open the given > file? Sur

[Rd] Interfacing with user in R

2006-01-10 Thread Augusto.Sanabria
Good day everyone, I am new in R programming (my question may sound trivial to you): is there any way to ask the user to enter a string within an R process, say a filename, make R to recognise it and open the given file? It is a simple exercise in other languages. I am using R2.1.1 in a LINUX

Re: [Rd] Issue with c++ .C call

2006-01-10 Thread Sean Davis
On 1/10/06 2:27 PM, "Thomas Lumley" <[EMAIL PROTECTED]> wrote: > On Tue, 10 Jan 2006, Sean Davis wrote: >> and such. However, the call to the function is via .C; parameters from the >> .C call are not being passed correctly to the function. As an example, I >> have attached a GDB run of the c

Re: [Rd] Issue with c++ .C call

2006-01-10 Thread Thomas Lumley
On Tue, 10 Jan 2006, Sean Davis wrote: > and such. However, the call to the function is via .C; parameters from the > .C call are not being passed correctly to the function. As an example, I > have attached a GDB run of the code. I set a breakpoint on entry to the > function I am calling from R.

Re: [Rd] Issue with c++ .C call

2006-01-10 Thread Sean Davis
On 1/10/06 1:41 PM, "Dominick Samperi" <[EMAIL PROTECTED]> wrote: > Sean, > > prm in your function calcStepgram is NOT a vector of doubles, it is of type > SEXP, and you need to use R macros to fetch the value(s). This is done > automatically in the Rcpp package, and if you want to see how thi

Re: [Rd] Issue with c++ .C call

2006-01-10 Thread Thomas Lumley
On Tue, 10 Jan 2006, Dominick Samperi wrote: > Sean, > > prm in your function calcStepgram is NOT a vector of doubles, it is of type > SEXP, and you need to use R macros to fetch the value(s). This is done > automatically in the Rcpp package, and if you want to see how this is > done look at the d

Re: [Rd] Issue with c++ .C call

2006-01-10 Thread Sean Davis
On 1/10/06 1:33 PM, "Prof Brian Ripley" <[EMAIL PROTECTED]> wrote: > Looks like a type mismatch in the call: you have not shown us the C++ > code. extern "C" void calcStepgram(double *data, double *prm, double *intervals, int *max, int *n,double *plot) { } > On Tue, 10 Jan 2006, Sean

Re: [Rd] Issue with c++ .C call

2006-01-10 Thread Dominick Samperi
Sean, prm in your function calcStepgram is NOT a vector of doubles, it is of type SEXP, and you need to use R macros to fetch the value(s). This is done automatically in the Rcpp package, and if you want to see how this is done look at the definition of the class RcppVector in Rcpp.cpp Dominick

[Rd] Issue with c++ .C call

2006-01-10 Thread Sean Davis
I am still having some difficulties with connecting R to a C++ function. I am able to call the function as expected after compiling the shared library and such. However, the call to the function is via .C; parameters from the .C call are not being passed correctly to the function. As an example,

Re: [Rd] eigen()

2006-01-10 Thread Martin Maechler
> "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]> > on Tue, 10 Jan 2006 15:01:00 + (GMT) writes: BDR> I haven't seen most of this thread, but this is a classic case of passing BDR> integers instead of doubles. And indeed BDR> else if(is.numeric(x)) { BDR> storage

Re: [Rd] standardized residuals (rstandard & plot.lm) (PR#8468)

2006-01-10 Thread Prof Brian Ripley
Martin, I tend to think that points with hii = 1 are best omitted, as in almost all cases you already know about them. I've yet to hear of a better compromise. Incidentally, this is neither a case of the subject nor of 8367 which that subject line refers to. So 8367 was fixed. Brian On Tu

Re: [Rd] eigen()

2006-01-10 Thread Peter Dalgaard
Prof Brian Ripley <[EMAIL PROTECTED]> writes: > I haven't seen most of this thread, but this is a classic case of > passing integers instead of doubles. And indeed > > else if(is.numeric(x)) { > storage.mode(x) <- "double" > > has been removed from eigen.R in R-devel in r36952. So t

Re: [Rd] eigen()

2006-01-10 Thread Prof Brian Ripley
I haven't seen most of this thread, but this is a classic case of passing integers instead of doubles. And indeed else if(is.numeric(x)) { storage.mode(x) <- "double" has been removed from eigen.R in R-devel in r36952. So that's the culprit. [BTW, x86 is not 64-bit, which is x86

Re: [Rd] standardized residuals (rstandard & plot.lm) (PR#8468)

2006-01-10 Thread maechler
> "Heather" == Heather Turner <[EMAIL PROTECTED]> > on Tue, 10 Jan 2006 14:30:23 +0100 (CET) writes: Heather> This bug is not quite fixed - the example from my Heather> original report now = works using R-2.2.1, but Heather> plot(Uniform, 6) Heather> does not. The bug

Re: [Rd] eigen()

2006-01-10 Thread Robin Hankin
On 10 Jan 2006, at 14:14, Peter Dalgaard wrote: > >>> Strange and semi-random results on SuSE 9.3 as well: >>> >>> eigen(matrix(1:100,10,10))$values >>> [1] 5.4e-311+ 0.0e+00i -2.5e-311+3.7e-311i -2.5e-311-3.7e-311i >>> [4] 2.5e-312+ 0.0e+00i -2.4e-312+ 0.0e+00i 3.2e-317+ 0.0e+00i >>>

Re: [Rd] eigen()

2006-01-10 Thread Peter Dalgaard
Hin-Tak Leung <[EMAIL PROTECTED]> writes: > Peter Dalgaard wrote: > > Robin Hankin <[EMAIL PROTECTED]> writes: > > > >>Hi > >> > >>I am having difficulty with eigen() on R-devel_2006-01-05.tar.gz > >> > >>Specifically, in R-2.2.0 I get expected behaviour: > >> > >> > >> > eigen(matrix(1:100,10,

Re: [Rd] eigen()

2006-01-10 Thread Hin-Tak Leung
Peter Dalgaard wrote: > Robin Hankin <[EMAIL PROTECTED]> writes: > > >>Hi >> >>I am having difficulty with eigen() on R-devel_2006-01-05.tar.gz >> >>Specifically, in R-2.2.0 I get expected behaviour: >> >> >> > eigen(matrix(1:100,10,10),FALSE,TRUE)$values >>[1] 5.208398e+02+0.00e+00i -1.5

Re: [Rd] eigen()

2006-01-10 Thread Peter Dalgaard
Peter Dalgaard <[EMAIL PROTECTED]> writes: > Robin Hankin <[EMAIL PROTECTED]> writes: > > > Hi > > > > I am having difficulty with eigen() on R-devel_2006-01-05.tar.gz > > > > Specifically, in R-2.2.0 I get expected behaviour: > > > > > > > eigen(matrix(1:100,10,10),FALSE,TRUE)$values > >

Re: [Rd] standardized residuals (rstandard & plot.lm) (PR#8468)

2006-01-10 Thread Heather . Turner
This bug is not quite fixed - the example from my original report now = works using R-2.2.1, but plot(Uniform, 6) does not. The bug is due to if (show[6]) { ymx <- max(cook, na.rm =3D TRUE) * 1.025 g <- hatval/(1 - hatval) # Potential division by zero here # plot(g, cook,

Re: [Rd] eigen()

2006-01-10 Thread Peter Dalgaard
Robin Hankin <[EMAIL PROTECTED]> writes: > Hi > > I am having difficulty with eigen() on R-devel_2006-01-05.tar.gz > > Specifically, in R-2.2.0 I get expected behaviour: > > > > eigen(matrix(1:100,10,10),FALSE,TRUE)$values > [1] 5.208398e+02+0.00e+00i -1.583980e+01+0.00e+00i > [3]

[Rd] eigen()

2006-01-10 Thread Robin Hankin
Hi I am having difficulty with eigen() on R-devel_2006-01-05.tar.gz Specifically, in R-2.2.0 I get expected behaviour: > eigen(matrix(1:100,10,10),FALSE,TRUE)$values [1] 5.208398e+02+0.00e+00i -1.583980e+01+0.00e+00i [3] -4.805412e-15+0.00e+00i 1.347691e-15+4.487511e-15i [5]

Re: [Rd] [R] ouml in an .Rd

2006-01-10 Thread Martin Maechler
> "PaulG" == Paul Gilbert <[EMAIL PROTECTED]> > on Mon, 09 Jan 2006 15:27:12 -0500 writes: PaulG> (moved from r-help) Ok, UTF-8 works on some of my PaulG> machines and latin1 on others. If I use one I get PaulG> failure or spurious characters when I build on the PaulG>