[Rd] TEXINPUTS and Sweave

2010-10-28 Thread Dominick Samperi
Is there a way to set TEXINPUTS for CRAN builds so that style files shipped with packages can be found if they are not in the working directory? Apparently there is an additional problem under Windows/MikTeX because recent versions of MikTeX ignore TEXINPUTS! Thanks, Dominick

[Rd] expressions as active bindings?

2010-10-28 Thread Vitalie S.
Hello everyone! Would it be possible some day to use expressions as active bindings? Something like makeActiveExpression(foo, Expr0, env) where Expr0 is executed in _env_ whenever foo is refereed. The motivation for this question is fourfold: - need to use - if the active binding is a

Re: [Rd] must .Call C functions return SEXP?

2010-10-28 Thread Andrew Piskorski
On Thu, Oct 28, 2010 at 12:15:56AM -0400, Simon Urbanek wrote: Reason I ask, is I've written some R code which allocates two long lists, and then calls a C function with .Call. My C code writes to those two pre-allocated lists, That's bad! All arguments are essentially read-only so you

[Rd] Reference Classes: Generalizing Reference Class Generator objects?

2010-10-28 Thread Daniel Lee
Is it possible to override the $new(...) in the reference class generator? I have tried adding a new method to the methods of the class, but that is obviously not correct. I have also tried adding it to the class generator, but the class generator still uses the default constructor. As a

Re: [Rd] must .Call C functions return SEXP?

2010-10-28 Thread Simon Urbanek
On Oct 28, 2010, at 9:48 AM, Andrew Piskorski wrote: On Thu, Oct 28, 2010 at 12:15:56AM -0400, Simon Urbanek wrote: Reason I ask, is I've written some R code which allocates two long lists, and then calls a C function with .Call. My C code writes to those two pre-allocated lists,

Re: [Rd] must .Call C functions return SEXP?

2010-10-28 Thread William Dunlap
-Original Message- From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On Behalf Of Andrew Piskorski Sent: Thursday, October 28, 2010 6:48 AM To: Simon Urbanek Cc: r-devel@r-project.org Subject: Re: [Rd] must .Call C functions return SEXP? On Thu, Oct 28,

Re: [Rd] Reference Classes: Generalizing Reference Class Generator objects?

2010-10-28 Thread Jon Clayden
Sorry - you don't need to assign the value of initFields(). I was going to do it in two lines but then realised one was enough... :) TestClass - setRefClass (TestClass, fields = list (text = character), methods = list ( initialize = function (text) {

[Rd] Unexpected behabiour of min, tapply and POSIXct/POSIXlt classes?

2010-10-28 Thread Carlos J. Gil Bellosta
Hello, I found rather surprising the behaviour of POSIXct and POSIXlt classes when combined with min and tapply. The details can be deduced from the script below: # Start of the script before - Sys.time() Sys.sleep( 1 ) now1 - now2 - Sys.time() my.times - c(

Re: [Rd] Unexpected behabiour of min, tapply and POSIXct/POSIXlt classes?

2010-10-28 Thread Joris Meys
Hi Carlos, this definitely does not belong to r-devel, just ask it on the normal help list or on www.stackoverflow.com next time. If you read the help file, this behaviour is exactly as expected : ---start quote--- Note that if the return value has a class (e.g. an object of class Date) the

Re: [Rd] Reference Classes: Generalizing Reference Class Generator objects?

2010-10-28 Thread Daniel Lee
Thank you. Your example really clarifies what the $initialize(...) function is supposed to do. Do you know if there is a straightforward way to dispatch the $new(...) method based on the signature of the arguments? I am thinking along the lines of S4 methods with valid signatures. Thanks

Re: [Rd] Reference Classes: Generalizing Reference Class Generator objects?

2010-10-28 Thread Jon Clayden
?ReferenceClasses says Reference methods can not themselves be generic functions; if you want additional function-based method dispatch, write a separate generic function and call that from the method. So I think you'd need to take that approach in your initialize method. Hope this helps, Jon

Re: [Rd] R-2.12.0 hangs while loading RGtk2 on FreeBSD

2010-10-28 Thread Michael Lawrence
On Wed, Oct 27, 2010 at 12:09 PM, Rainer Hurling rhur...@gwdg.de wrote: On 27.10.2010 15:07 (UTC+1), Michael Lawrence wrote: On Sat, Oct 23, 2010 at 2:49 AM, Rainer Hurling rhur...@gwdg.de mailto:rhur...@gwdg.de wrote: On 22.10.2010 22:10 (UTC+1), Rainer Hurling wrote: On

[Rd] make check-all error on Win 7 with 2-12-.0: vfork: Resource temporarily unavailable

2010-10-28 Thread Andy Bunn
Hi all, I just built R from src on Windows 7 using Rtools212.exe. The build went as usual (R, bitmaps, and manuals all OK) but make check-all failed when running the examples for package 'tcltk': ... running code in 'demos2.R' ... OK running tests of primitives running code in 'primitives.R'

Re: [Rd] must .Call C functions return SEXP?

2010-10-28 Thread Dominick Samperi
See comments on Rcpp below. On Thu, Oct 28, 2010 at 11:28 AM, William Dunlap wdun...@tibco.com wrote: -Original Message- From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On Behalf Of Andrew Piskorski Sent: Thursday, October 28, 2010 6:48 AM To: Simon

Re: [Rd] R-2.12.0 hangs while loading RGtk2 on FreeBSD

2010-10-28 Thread Rainer Hurling
On 28.10.2010 20:07 (UTC+1), Michael Lawrence wrote: On Wed, Oct 27, 2010 at 12:09 PM, Rainer Hurling rhur...@gwdg.de mailto:rhur...@gwdg.de wrote: On 27.10.2010 15:07 (UTC+1), Michael Lawrence wrote: On Sat, Oct 23, 2010 at 2:49 AM, Rainer Hurling rhur...@gwdg.de

Re: [Rd] must .Call C functions return SEXP?

2010-10-28 Thread Andrew Piskorski
On Thu, Oct 28, 2010 at 10:59:26AM -0400, Simon Urbanek wrote: Because R assumes that you don't mess with the arguments, it also optimizes b to point to the same object as a which you then modify. I hope it sheds some light on it. Indeed! Thank you Simon, that was a thorough and

Re: [Rd] make check-all error on Win 7 with 2-12-.0: vfork: Resource temporarily unavailable

2010-10-28 Thread Prof Brian Ripley
This is a problem in the toolset (Cygwin), not in R, and indicates the machine was too busy (more or less as it says). On Thu, 28 Oct 2010, Andy Bunn wrote: Hi all, I just built R from src on Windows 7 using Rtools212.exe. The build went as usual (R, bitmaps, and manuals all OK) but make

Re: [Rd] [Rcpp-devel] must .Call C functions return SEXP?

2010-10-28 Thread Douglas Bates
On Thu, Oct 28, 2010 at 1:44 PM, Dominick Samperi djsamp...@gmail.com wrote: See comments on Rcpp below. On Thu, Oct 28, 2010 at 11:28 AM, William Dunlap wdun...@tibco.com wrote: -Original Message- From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On

Re: [Rd] [Rcpp-devel] must .Call C functions return SEXP?

2010-10-28 Thread Dominick Samperi
On Thu, Oct 28, 2010 at 6:04 PM, Douglas Bates ba...@stat.wisc.edu wrote: On Thu, Oct 28, 2010 at 1:44 PM, Dominick Samperi djsamp...@gmail.com wrote: See comments on Rcpp below. On Thu, Oct 28, 2010 at 11:28 AM, William Dunlap wdun...@tibco.com wrote: -Original Message-

[Rd] list2env() is broken

2010-10-28 Thread Hervé Pagès
Hi, The following code produces different kinds of problems depending on which platform you run it: x - as.list(1:20) names(x) - paste(A, 1:20, sep=) e - list2env(x) Timeout on Linux, crash on Mac and Windows, with R 2.12.0 and current R devel. The multi-assign mode (i.e. when