Re: [Rd] profiling C code

2006-02-20 Thread Prof Brian Ripley
On Mon, 20 Feb 2006, Liaw, Andy wrote: > The last time I tried I didn't have much luck. The gprof manual I could > find seems to indicate that it can not profile code that are dynamically > loaded. (I was trying on Linux.) The R source seems to hint otherwise. grof is not mentioned in any of t

Re: [Rd] profiling C code

2006-02-20 Thread Torsten Hothorn
On Mon, 20 Feb 2006, Liaw, Andy wrote: > The last time I tried I didn't have much luck. The gprof manual I could > find seems to indicate that it can not profile code that are dynamically > loaded. (I was trying on Linux.) The R source seems to hint otherwise. > I'd very much appreciate pointe

Re: [Rd] simple C function segfaults

2006-02-20 Thread Paul Roebuck
On Tue, 21 Feb 2006, Bernd Kriegstein wrote: > I use the simplest of examples that somebody can think > of in order to generate a matrix of random numbers > from within C, calling appropriate R functions. The > concrete example is below: > [SNIP] -- pico.c #include #include #includ

Re: [Rd] simple C function segfaults

2006-02-20 Thread Bernd Kriegstein
Berwin thanks, I tried that, but it didn't work. There is a conflict in using a pointer for the operation defined in the #define. The error message is: pico.c:17: warning: comparison between pointer and integer Suppose that I use pointers for n and m. What should I alter in the program in order f

Re: [Rd] simple C function segfaults

2006-02-20 Thread Berwin A Turlach
> "BK" == Bernd Kriegstein <[EMAIL PROTECTED]> writes: BK> void pico ( double *y, int n, int m ) ^ Everything is passed from R to C as pointer, so these should be pointers. Hope this helps. Cheers, Berwin __

[Rd] simple C function segfaults

2006-02-20 Thread Bernd Kriegstein
Hello, I use the simplest of examples that somebody can think of in order to generate a matrix of random numbers from within C, calling appropriate R functions. The concrete example is below: --- file pico.c #include #include #include #include #include #define COLM( i, j, m ) ( m*j + i) v

Re: [Rd] profiling C code

2006-02-20 Thread Liaw, Andy
The last time I tried I didn't have much luck. The gprof manual I could find seems to indicate that it can not profile code that are dynamically loaded. (I was trying on Linux.) The R source seems to hint otherwise. I'd very much appreciate pointers as well. Andy From: Ross Boylan > > Does an

[Rd] profiling C code

2006-02-20 Thread Ross Boylan
Does anyone have any advice about profiling C/C++ code in a package under R? Does R need to be built specially for this to work? The FAQ has some entries about profiling but they cover R level profiling; I'm try to get at the C++ code I've written that is called from R. Primary target is Mac OS

[Rd] [REQ] Add Title Argument for Interactive Devices

2006-02-20 Thread Paul Roebuck
As a generic capability, would it be possible for all known interactive devices (x11, windows, quartz) to have a title argument that could be displayed in their titlebar when invoked? Sounds like a roundabout means of doing so for x11() may be possible in R-2.3 via X resources. --

[Rd] changes in r-devel for S3/S4 objects

2006-02-20 Thread John Chambers
Two recent changes have been committed to r-devel, related to discussions on this list earlier: 1. setOldClass() has an argument prototype= to specify the default object for the class. If provided, the S3 class can be a slot in an S4 class, with a valid default object. (It's still not going

Re: [Rd] R CMD config --cppflags buglet

2006-02-20 Thread Dirk Eddelbuettel
On 20 February 2006 at 13:07, Dirk Eddelbuettel wrote: | Precisely -- The trivial shell script I wrote actually calls | | cd /opt/JGR-1.3 && java -cp JGR.jar:. -Xmx512m org.rosuda.JGR.JGR $* | | as 'java' is handled The Right Way (TM) by Debian's update-alternatives(8). That came out wrong

Re: [Rd] invalid graphics state using dev.print (fwd)

2006-02-20 Thread Paul Roebuck
On Mon, 20 Feb 2006, Prof Brian Ripley wrote: > On Mon, 20 Feb 2006, Paul Murrell wrote: > > [...] > > >>>> x11() > >>>> plot(rnorm(10)) > >>>> dev.print(png) > > >> Paul> Error in dev.copy(device = function (filename = "Rplot%03d.png", > >> width = > >> Paul> 480, : > >>

Re: [Rd] R CMD config --cppflags buglet

2006-02-20 Thread Dirk Eddelbuettel
On 20 February 2006 at 13:15, Simon Urbanek wrote: | | On Feb 20, 2006, at 12:01 PM, Dirk Eddelbuettel wrote: | | > There is other small gotcha. I used the .deb packages sun-j2se5.0- | > jdk-binary and sun-j2se5.0-jre-binary which may do things | > differently from other JRE/JDK. In any event

Re: [Rd] R CMD config --cppflags buglet

2006-02-20 Thread Simon Urbanek
On Feb 20, 2006, at 12:01 PM, Dirk Eddelbuettel wrote: > There is other small gotcha. I used the .deb packages sun-j2se5.0- > jdk-binary and sun-j2se5.0-jre-binary which may do things > differently from other JRE/JDK. In any event JGR came with > /usr/lib/j2se5.0-sun//bin/java -cp JGR.jar:.

Re: [Rd] R CMD config --cppflags buglet

2006-02-20 Thread Prof Brian Ripley
On Mon, 20 Feb 2006, Simon Urbanek wrote: > > On Feb 20, 2006, at 9:45 AM, Prof Brian Ripley wrote: > >> Dirk, >> >> It was even more wrong in R-devel, for there we have sub-architectures and >> it needs to be "-I${R_INCLUDE_DIR} -I${R_INCLUDE_DIR}${R_ARCH}". >> Fixed now, thanks. >> >> I don't

Re: [Rd] R CMD config --cppflags buglet

2006-02-20 Thread Dirk Eddelbuettel
Simon, Markus, On 20 February 2006 at 11:31, Simon Urbanek wrote: | Dirk, | | On Feb 20, 2006, at 11:22 AM, Dirk Eddelbuettel wrote: | | > As you asked, the two failure were gnomeGUI which has a hardcoded | > $R_HOME/include which could get fixed, and JGR which isn't even on | > CRAN |

Re: [Rd] R CMD config --cppflags buglet

2006-02-20 Thread Prof Brian Ripley
On Mon, 20 Feb 2006, Dirk Eddelbuettel wrote: > > Brian, Simon, > > On 20 February 2006 at 14:45, Prof Brian Ripley wrote: > | Dirk, > | > | It was even more wrong in R-devel, for there we have sub-architectures and > | it needs to be "-I${R_INCLUDE_DIR} -I${R_INCLUDE_DIR}${R_ARCH}". > | Fixed now

Re: [Rd] R CMD config --cppflags buglet

2006-02-20 Thread Simon Urbanek
Dirk, On Feb 20, 2006, at 11:22 AM, Dirk Eddelbuettel wrote: > As you asked, the two failure were gnomeGUI which has a hardcoded > $R_HOME/include which could get fixed, and JGR which isn't even on > CRAN Thanks for pointing this out. JGR is a completely different beast and unfortunate

Re: [Rd] R CMD config --cppflags buglet

2006-02-20 Thread Dirk Eddelbuettel
(resending, had the CC header foobar'ed. My bad --Dirk) Brian, Simon, On 20 February 2006 at 14:45, Prof Brian Ripley wrote: | Dirk, | | It was even more wrong in R-devel, for there we have sub-architectures and | it needs to be "-I${R_INCLUDE_DIR} -I${R_INCLUDE_DIR}${R_ARCH}".

Re: [Rd] Matrix / SparseM conflict (PR#8618)

2006-02-20 Thread roger koenker
On Feb 20, 2006, at 8:29 AM, Prof Brian Ripley wrote: > On Mon, 20 Feb 2006, Duncan Murdoch wrote: > >> On 2/20/2006 8:54 AM, [EMAIL PROTECTED] wrote: >>> Full_Name: David Pleydell >>> Version: 2.2.1 >>> OS: Debian Etch >>> Submission from: (NULL) (193.55.70.206) >>> >>> >>> There appears to be a

Re: [Rd] R CMD config --cppflags buglet

2006-02-20 Thread Simon Urbanek
On Feb 20, 2006, at 9:45 AM, Prof Brian Ripley wrote: > Dirk, > > It was even more wrong in R-devel, for there we have sub- > architectures and > it needs to be "-I${R_INCLUDE_DIR} -I${R_INCLUDE_DIR}${R_ARCH}". > Fixed now, thanks. > > I don't think there is any problem in R.sh.in. > > Brian > >

Re: [Rd] R CMD config --cppflags buglet

2006-02-20 Thread Prof Brian Ripley
Dirk, It was even more wrong in R-devel, for there we have sub-architectures and it needs to be "-I${R_INCLUDE_DIR} -I${R_INCLUDE_DIR}${R_ARCH}". Fixed now, thanks. I don't think there is any problem in R.sh.in. Brian On Mon, 20 Feb 2006, Dirk Eddelbuettel wrote: > > As you may recall, a Debi

Re: [Rd] Matrix / SparseM conflict (PR#8618)

2006-02-20 Thread Prof Brian Ripley
On Mon, 20 Feb 2006, Duncan Murdoch wrote: > On 2/20/2006 8:54 AM, [EMAIL PROTECTED] wrote: >> Full_Name: David Pleydell >> Version: 2.2.1 >> OS: Debian Etch >> Submission from: (NULL) (193.55.70.206) >> >> >> There appears to be a conflict between the chol functions from the Matrix and >> the Spa

[Rd] R CMD config --cppflags buglet

2006-02-20 Thread Dirk Eddelbuettel
As you may recall, a Debian user complained last year about how R is out of line with respect to the filesystem standards (where, in essence, architecture independent files should be in /usr/share, not /usr/lib). While I more or less just told him to get lost, I think it was mostly BDR who actual

Re: [Rd] Matrix / SparseM conflict (PR#8618)

2006-02-20 Thread ripley
Both are contributed packages. The R-bugs repository is for bugs in R, not for contributed packages, as clearly stated in the R FAQ. Finally, check carefully whether the bug is with R, or a contributed package. Bug reports on contributed packages should be sent first to the package mai

Re: [Rd] Matrix / SparseM conflict (PR#8618)

2006-02-20 Thread Duncan Murdoch
On 2/20/2006 8:54 AM, [EMAIL PROTECTED] wrote: > Full_Name: David Pleydell > Version: 2.2.1 > OS: Debian Etch > Submission from: (NULL) (193.55.70.206) > > > There appears to be a conflict between the chol functions from the Matrix and > the SparseM packages. chol() can only be applied to a matri

[Rd] Matrix / SparseM conflict (PR#8618)

2006-02-20 Thread dpleydel
Full_Name: David Pleydell Version: 2.2.1 OS: Debian Etch Submission from: (NULL) (193.55.70.206) There appears to be a conflict between the chol functions from the Matrix and the SparseM packages. chol() can only be applied to a matrix of class dspMatrix if SparseM is not in the path. with grati

Re: [Rd] invalid graphics state using dev.print (fwd)

2006-02-20 Thread Prof Brian Ripley
On Mon, 20 Feb 2006, Prof Brian Ripley wrote: > On Mon, 20 Feb 2006, Paul Murrell wrote: > > [...] > >>> >> x11() >>> >> plot(rnorm(10)) >>> >> dev.print(png) > >>> Paul> Error in dev.copy(device = function (filename = "Rplot%03d.png", >>> width = >>> Paul> 480, : >>> Paul> inv

Re: [Rd] Bug in Sweave? -- scoping problem? (PR#8615)

2006-02-20 Thread Friedrich . Leisch
I will add it to the FAQ. fritz > On Sun, 19 Feb 2006 08:42:09 -0500, > Duncan Murdoch (DM) wrote: [...] > Code in chunks that produce pictures is executed several times. > First, to produce the output in the text. And then once more > for *each* format in which the