Re: [Rd] relist, an inverse operator to unlist

2007-05-13 Thread Gabor Grothendieck
unlist would not attach a skeleton to every vector it returns, only the relist method of unlist would. That way just that method needs to be added and no changes to unlist itself are needed. Before applying unlist to an object you would coerce the object to class "relist" to force the relist met

Re: [Rd] relist, an inverse operator to unlist

2007-05-13 Thread Andrew Clausen
Hi Gabor, Thanks for the interesting suggestion. I must confess I got lost -- is it something like this? * unlist() could attach skeleton to every vector it returns. * relist() could then use the skeleton attached to the vector to reconstruct the object. The interface might be relist

[Rd] Native implementation of rowMedians()

2007-05-13 Thread Henrik Bengtsson
Hi, I've got a version of rowMedians(x, na.rm=FALSE) for matrices that handles missing values implemented in C. It has been optimized for memory and speed. To avoid coercing integers to doubles, and hence allocate an additional 200% memory, there is one C function for integers and one for double

Re: [Rd] Help understanding LAPACK symbol resolution

2007-05-13 Thread Martin Morgan
Prof. Ripley, Thank you for the very helpful guidance and pointer to fastICA. Martin Prof Brian Ripley <[EMAIL PROTECTED]> writes: > On Sun, 13 May 2007, Martin Morgan wrote: > >> R developers, >> >> I am trying to understand how symbols are resolved, so that I can >> configure a package that

[Rd] select.list() not on front of other windows

2007-05-13 Thread Henrik Bengtsson
When calling select.list(letters[1:3]) in a fresh R session (R v2.4.1, v2.5.0, v2.6.0 devel) on WinXP using *Rterm*, the dialog does *not* come up on front of other windows the first time you call it. Under Rgui it works just fine. If you do: 1) select.list(letters[1:3]) 2) bring the windo

Re: [Rd] relist, an inverse operator to unlist

2007-05-13 Thread Gabor Grothendieck
I suggest you define a "relist" class and then define an unlist method for it which stores the skeleton as an attribute. Then one would not have to specify skeleton in the relist command so relist(unlist(relist(x))) === x 1. relist(x) is the same as x except it gets an additional class "relist".

Re: [Rd] symbollic differentiation in R

2007-05-13 Thread Gabor Grothendieck
On 5/13/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > On 5/13/07, Andrew Clausen <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > I wrote a symbollic differentiation function in R, which can be downloaded > > here: > > > >http://www.econ.upenn.edu/~clausen/computing/Deriv.R > >h

Re: [Rd] Help understanding LAPACK symbol resolution

2007-05-13 Thread Prof Brian Ripley
On Sun, 13 May 2007, Martin Morgan wrote: > R developers, > > I am trying to understand how symbols are resolved, so that I can > configure a package that I contributed to, and so that I can provide > guidance to (linux / OSX) users of the package. To be concrete, my > package uses the LAPACK Fort

[Rd] Help understanding LAPACK symbol resolution

2007-05-13 Thread Martin Morgan
R developers, I am trying to understand how symbols are resolved, so that I can configure a package that I contributed to, and so that I can provide guidance to (linux / OSX) users of the package. To be concrete, my package uses the LAPACK Fortran symbol zsysv. This is not in libRlapack, but is de

Re: [Rd] relist, an inverse operator to unlist

2007-05-13 Thread Andrew Clausen
On Sun, May 13, 2007 at 01:29:11PM -0400, Andrew Clausen wrote: > R has a function to convert complex objects into a vector > representation. This file provides an inverse operation called "unlist" to > convert vectors back to the convenient structural representation. Oops. I meant to say: R ha

Re: [Rd] symbollic differentiation in R

2007-05-13 Thread Gabor Grothendieck
On 5/13/07, Andrew Clausen <[EMAIL PROTECTED]> wrote: > Hi all, > > I wrote a symbollic differentiation function in R, which can be downloaded > here: > >http://www.econ.upenn.edu/~clausen/computing/Deriv.R >http://www.econ.upenn.edu/~clausen/computing/Simplify.R > > It is just a pr

[Rd] relist, an inverse operator to unlist

2007-05-13 Thread Andrew Clausen
Hi all, I wrote a function called relist, which is an inverse to the existing unlist function: http://www.econ.upenn.edu/~clausen/computing/relist.R Some functions need many parameters, which are most easily represented in complex structures. Unfortunately, many mathematical functions i

[Rd] symbollic differentiation in R

2007-05-13 Thread Andrew Clausen
Hi all, I wrote a symbollic differentiation function in R, which can be downloaded here: http://www.econ.upenn.edu/~clausen/computing/Deriv.R http://www.econ.upenn.edu/~clausen/computing/Simplify.R It is just a prototype. Of course, R already contains two differentiation functio

Re: [Rd] Strange behavior of debugger

2007-05-13 Thread Duncan Murdoch
On 13/05/2007 12:21 AM, Tong Wang wrote: > Hi, All: > I had some trouble debugging C source dynamically loaded into R , when I > issued N in gdb(or insight) , the debugger, instead of moving downward step > by step, jumped to strange positions (upward, downward, one step, a few steps > away

Re: [Rd] Implicit vs explicit printing and the call stack

2007-05-13 Thread hadley wickham
On 5/13/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > On Sun, 13 May 2007, hadley wickham wrote: > > >> First, it was not clear that you are talking about the output of > >> traceback(), which is _a representation of_ the call stack and depends on > >> the details of deparsing. > > > > Given t

Re: [Rd] Implicit vs explicit printing and the call stack

2007-05-13 Thread Prof Brian Ripley
On Sun, 13 May 2007, hadley wickham wrote: >> First, it was not clear that you are talking about the output of >> traceback(), which is _a representation of_ the call stack and depends on >> the details of deparsing. > > Given that there is a substantial delay in one case, and not in the > other,

Re: [Rd] Implicit vs explicit printing and the call stack

2007-05-13 Thread hadley wickham
> First, it was not clear that you are talking about the output of > traceback(), which is _a representation of_ the call stack and depends on > the details of deparsing. Given that there is a substantial delay in one case, and not in the other, I had assumed (perhaps falsely) that there was somet

Re: [Rd] Implicit vs explicit printing and the call stack

2007-05-13 Thread Prof Brian Ripley
First, it was not clear that you are talking about the output of traceback(), which is _a representation of_ the call stack and depends on the details of deparsing. Second, the difference is I believe not implicit vs explicit printing, but of printing an evaluated object vs printing a call. Wh