Re: [Rd] valgrind crashing

2012-09-11 Thread Prof Brian Ripley
On 12/09/2012 06:56, David wrote: I am trying to do a classic R -d valgrind --vanilla < mypkg-Ex.R as described in http://cs.swan.ac.uk/~csoliver/ok-sat-library/internet_html/doc/doc/R/2.9.1/doc/manual/R-exts.html#Using-valgrind The problem is valgrind crashes imediately. I am using Ubuntu 10

Re: [Rd] valgrind crashing

2012-09-11 Thread David
> I am trying to do a classic > > R -d valgrind --vanilla < mypkg-Ex.R > > as described in > http://cs.swan.ac.uk/~csoliver/ok-sat-library/internet_html/doc/doc/R/2.9.1/doc/manual/R-exts.html#Using-valgrind > > The problem is valgrind crashes imediately. > > I am using Ubuntu 10.04 LST (actually B

[Rd] valgrind crashing

2012-09-11 Thread David
I am trying to do a classic R -d valgrind --vanilla < mypkg-Ex.R as described in http://cs.swan.ac.uk/~csoliver/ok-sat-library/internet_html/doc/doc/R/2.9.1/doc/manual/R-exts.html#Using-valgrind The problem is valgrind crashes imediately. I am using Ubuntu 10.04 LST (actually Biolinux) on a 64

Re: [Rd] Suggest adding a 'pivot' argument to qr.R

2012-09-11 Thread Tim Hesterberg
>On Sep 11, 2012, at 16:02 , Warnes, Gregory wrote: > >> >> On 9/7/12 2:42 PM, "peter dalgaard" wrote: >> >>> >>> On Sep 7, 2012, at 17:16 , Tim Hesterberg wrote: >>> I suggest adding a 'pivot' argument to qr.R, to obtain columns in the same order as the original x, so that a <- qr(

Re: [Rd] Is invokeRestart("abort") unstoppable?

2012-09-11 Thread Martin Morgan
On 09/11/2012 04:19 PM, Henrik Bengtsson wrote: Hi, I'm trying to implement an abort() method that works just like stop() but does not signal the condition such that try() and tryCatch(..., condition=...) are, contrary to stop(), effectively non-working with abort() calls. In order to achieve t

Re: [Rd] R crashes when printing a named numeric vector of a specific class - Bug?

2012-09-11 Thread Henrik Bengtsson
For whoever is going to troubleshoot this, I cannot reproduce this endless-loop crash on Windows (Platform: x86_64-w64-mingw32/x64 (64-bit)). With: > foo <- function () { + x <- c("A" = 1.3, "B" = 0.7, "C" = -0.3) + structure(x, class = "bar") + } > > print.bar <- function (x, ...) { + print(

[Rd] Is invokeRestart("abort") unstoppable?

2012-09-11 Thread Henrik Bengtsson
Hi, I'm trying to implement an abort() method that works just like stop() but does not signal the condition such that try() and tryCatch(..., condition=...) are, contrary to stop(), effectively non-working with abort() calls. In order to achieve this, I stumbled upon invokeRestart("abort"), cf. h

Re: [Rd] Suggest adding a 'pivot' argument to qr.R

2012-09-11 Thread peter dalgaard
On Sep 11, 2012, at 16:02 , Warnes, Gregory wrote: > > On 9/7/12 2:42 PM, "peter dalgaard" wrote: > >> >> On Sep 7, 2012, at 17:16 , Tim Hesterberg wrote: >> >>> I suggest adding a 'pivot' argument to qr.R, to obtain columns in the >>> same order as the original x, so that >>> a <- qr(x) >>>

Re: [Rd] R crashes when printing a named numeric vector of a specific class - Bug?

2012-09-11 Thread R. Michael Weylandt
On Tue, Sep 11, 2012 at 4:35 PM, Milan Bouchet-Valat wrote: > Le mardi 11 septembre 2012 à 16:53 +0200, Basil Abou El-Komboz a écrit : >> Dear useR's, >> >> today I stumbled over an interesting phenomenon: First, I created a >> named numeric vector with a certain class and several attributes via t

Re: [Rd] R crashes when printing a named numeric vector of a specific class - Bug?

2012-09-11 Thread Milan Bouchet-Valat
Le mardi 11 septembre 2012 à 16:53 +0200, Basil Abou El-Komboz a écrit : > Dear useR's, > > today I stumbled over an interesting phenomenon: First, I created a > named numeric vector with a certain class and several attributes via the > structure() function. After that, I implemented a simple prin

Re: [Rd] R crashes when printing a named numeric vector of a specific class - Bug?

2012-09-11 Thread Jeff Ryan
print(x) in print.bar is calling print.bar again. You need to do something like print(unclass(x)) HTH Jeff On Tue, Sep 11, 2012 at 9:53 AM, Basil Abou El-Komboz wrote: > Dear useR's, > > today I stumbled over an interesting phenomenon: First, I created a > named numeric vector with a certain cl

Re: [Rd] Advice on Namespaces

2012-09-11 Thread Bert Gunter
Thanks Duncan. This was very helpful. -- Bert On Tue, Sep 11, 2012 at 4:05 AM, Duncan Murdoch wrote: > On 12-09-10 12:11 PM, Bert Gunter wrote: >> >> Hi Folks: >> >> I'm writing a little package that may not ever hit CRAN or even be >> distributed beyond a relatively narrow audience at my compan

[Rd] R crashes when printing a named numeric vector of a specific class - Bug?

2012-09-11 Thread Basil Abou El-Komboz
Dear useR's, today I stumbled over an interesting phenomenon: First, I created a named numeric vector with a certain class and several attributes via the structure() function. After that, I implemented a simple print method for this class. When calling this function it produces an endless loop of

Re: [Rd] Suggest adding a 'pivot' argument to qr.R

2012-09-11 Thread Warnes, Gregory
On 9/7/12 2:42 PM, "peter dalgaard" wrote: > >On Sep 7, 2012, at 17:16 , Tim Hesterberg wrote: > >> I suggest adding a 'pivot' argument to qr.R, to obtain columns in the >> same order as the original x, so that >> a <- qr(x) >> qr.Q(a) %*% qr.R(a, pivot=TRUE) >> returns x. > >That would come s

Re: [Rd] Advice on Namespaces

2012-09-11 Thread Duncan Murdoch
On 12-09-10 12:11 PM, Bert Gunter wrote: Hi Folks: I'm writing a little package that may not ever hit CRAN or even be distributed beyond a relatively narrow audience at my company. Nevertheless, I have tried to adhere to practices that would work if it were. With that in mind, I have read the Wr

[Rd] Advice on Namespaces

2012-09-11 Thread Bert Gunter
Hi Folks: I'm writing a little package that may not ever hit CRAN or even be distributed beyond a relatively narrow audience at my company. Nevertheless, I have tried to adhere to practices that would work if it were. With that in mind, I have read the Writing R Extensions Manual (and my humble ku

[Rd] Different behavior of the "showArgs" example (R extension manual) between gcc and Visual C++ compiled code

2012-09-11 Thread Jean-Michel.Perraud
Hi, I am trying to implement on a Win7 box the showArgs example of section 5.10.2 "Calling .External" of the R extension manual. I am using interchangeably gcc (RTools) and Visual C++ (via Makefile.win) to build a package. I get a couple of runtime oddities when the dll compiled with Visual C++