[Rd] Strange behavior of assign in a S4 method.

2010-03-15 Thread Christophe Genolini
Hi the list, I define a method that want to change an object without assignation (foo(x) and not x<-foo(x)) using deparse and assign. But when the argument of the method does not match *exactly* with the definition of the generic function, assign does not work... Anything wrong? Christophe #-

[Rd] tcltk and R

2010-03-15 Thread Gabor Grothendieck
I have had some comments on sqldf regarding its dependence on tcltk such as the second last sentence on this blog post: http://translate.google.com/translate?hl=en&sl=zh-CN&u=http://www.wentrue.net/blog/%3Fp%3D453&prev=http://blogsearch.google.com/blogsearch%3Fhl%3Den%26ie%3DUTF-8%26q%3Dsqldf%26lr

Re: [Rd] tcltk and R

2010-03-15 Thread Roger Peng
R can be built without tcl/tk and so I think it would still be good to check at runtime. -roger On Mon, Mar 15, 2010 at 11:21 AM, Gabor Grothendieck wrote: > I have had some comments on sqldf regarding its dependence on tcltk > such as the second last sentence on this blog post: > > http://trans

Re: [Rd] Associative array?

2010-03-15 Thread Roger Peng
If I recall correctly, I thought indexing a vector/list with a character vector uses hashing if the vector is over a certain length (I can't remember the cutoff). Otherwise, it's a linear operation. -roger On Thu, Mar 11, 2010 at 8:09 PM, Ben wrote: >> lists are generic vectors with names so loo

Re: [Rd] Associative array?

2010-03-15 Thread Simon Urbanek
Roger, On Mar 15, 2010, at 15:25 , Roger Peng wrote: If I recall correctly, I thought indexing a vector/list with a character vector uses hashing if the vector is over a certain length (I can't remember the cutoff). Otherwise, it's a linear operation. What I was talking about was lookup of o

Re: [Rd] Strange behavior of assign in a S4 method.

2010-03-15 Thread Wolfgang Huber
Dear Christophe type showMethods("foo1", inc=TRUE) showMethods("foo2", inc=TRUE) to see the difference between the two functions, and this will explain their different behaviour. This feature of S4 has been discussed here many times before, see e.g.: http://tolstoy.newcastle.edu.au/R/e4/help

Re: [Rd] tcltk and R

2010-03-15 Thread Peter Dalgaard
Gabor Grothendieck wrote: > I have had some comments on sqldf regarding its dependence on tcltk > such as the second last sentence on this blog post: > > http://translate.google.com/translate?hl=en&sl=zh-CN&u=http://www.wentrue.net/blog/%3Fp%3D453&prev=http://blogsearch.google.com/blogsearch%3Fhl%

[Rd] Making descriptive analyisis in R

2010-03-15 Thread kyawkkhtet
when I try to make a package coping R code such as tab1, summ, titleString, setTitle from epicalc package, the following problems are found. * using log directory 'C:/Rpackage/EpiStat.Rcheck' * using R version 2.10.0 (2009-10-26) * using session charset: ISO8859-1 * checking for file 'EpiStat/DES

Re: [Rd] Segfault Problem c++ R interface (detailed)

2010-03-15 Thread Seth Falcon
Hi, First thing to observe is that you are calling RSymbReg via .Call, but that function does not return SEXP as is required by the .Call interface. + seth __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Segfault Problem c++ R interface (detailed)

2010-03-15 Thread Hyunseung Kang
Thank you so much! Although the memory leak is still there after the fix you suggested, gdb is giving me better outputs and I believe I can trace the memory leak origin. -Hyunseung On Mon, Mar 15, 2010 at 2:53 PM, Seth Falcon wrote: > Hi, > > First thing to observe is that you are calling RSymbR

Re: [Rd] list_files() memory corruption?

2010-03-15 Thread Seth Falcon
Hi Alistair, On 3/12/10 4:37 PM, Alistair Gee wrote: > I am using R-2-10 from subversion. > > In the implementation of do_listfiles() in platform.c, it appears to > allocate a vector of length count where count is calculated by > count_files(). It then proceeds to call list_files(), passing in th

Re: [Rd] list_files() memory corruption?

2010-03-15 Thread Alistair Gee
I think I have a fix that avoids the problem by just growing the vector as necessary as the directory is traversed (and no longer uses count_lines()). I don't have access to the code at the moment, but I should be able to post the patch tomorrow. Is there interest in my patch? On Mon, Mar 15, 201

Re: [Rd] list_files() memory corruption?

2010-03-15 Thread Seth Falcon
On 3/15/10 8:37 PM, Alistair Gee wrote: > I think I have a fix that avoids the problem by just growing the > vector as necessary as the directory is traversed (and no longer uses > count_lines()). > > I don't have access to the code at the moment, but I should be able to > post the patch tomorrow.