Re: [Rd] Defining environments within functions

2008-08-29 Thread Duncan Murdoch
Matt Calder wrote: Duncan, Sorry to be, well, nit picking, but I can't get your example to run. I am a longtime Splus user and am only using R on the side. The concept of environments is one I have yet to grasp. I think the example you are trying to provide will illuminate things for me,

[Rd] non user-friendly error for chol2inv functions

2008-08-29 Thread christophe dutang
Hi, In function chol2inv with the option LINPACK set to false (default), it raises an error when the matrix is 1x1 matrix (i.e. just a real) saying 'a' must be a numeric matrix This error is raised by the underlying C function (modLa_chol2inv in function Lapack.c). Everything is normal, but I wo

Re: [Rd] Defining environments within functions

2008-08-29 Thread Duncan Murdoch
On 29/08/2008 6:52 AM, Giles Hooker wrote: Thanks, I think I over-emphasized the secondary function, but I can generate the scoping problem as follows. First, at the command line, I can get a function to access objects that were not in its arguments by ProfileEnv = new.env() hello.world = "H

Re: [Rd] non user-friendly error for chol2inv functions

2008-08-29 Thread Martin Maechler
> "cd" == christophe dutang <[EMAIL PROTECTED]> > on Fri, 29 Aug 2008 12:44:18 +0200 writes: cd> Hi, cd> In function chol2inv with the option LINPACK set to false (default), it cd> raises an error when the matrix is 1x1 matrix (i.e. just a real) saying cd> 'a' must be

Re: [Rd] non user-friendly error for chol2inv functions

2008-08-29 Thread christophe dutang
Yes, I do not cast the first argument as a matrix with as.matrix function. Maybe we could detail the error message if the first argument is a numeric? error(_("'a' is a numeric and must be coerced to a numeric matrix")); Thanks for your answer 2008/8/29 Martin Maechler <[EMAIL PROTECTED]> > >>

Re: [Rd] non user-friendly error for chol2inv functions

2008-08-29 Thread Martin Maechler
> "cd" == christophe dutang <[EMAIL PROTECTED]> > on Fri, 29 Aug 2008 14:28:42 +0200 writes: cd> Yes, I do not cast the first argument as a matrix with as.matrix function. cd> Maybe we could detail the error message if the first argument is a numeric? cd> error(_("'a' is

Re: [Rd] Defining environments within functions

2008-08-29 Thread Giles Hooker
Thanks, I think I over-emphasized the secondary function, but I can generate the scoping problem as follows. First, at the command line, I can get a function to access objects that were not in its arguments by ProfileEnv = new.env() hello.world = "Hello World" assign('hello.world',hello.worl

Re: [Rd] non user-friendly error for chol2inv functions

2008-08-29 Thread Ted Harding
On 29-Aug-08 13:00:01, Martin Maechler wrote: >> "cd" == christophe dutang <[EMAIL PROTECTED]> >> on Fri, 29 Aug 2008 14:28:42 +0200 writes: > > cd> Yes, I do not cast the first argument as a matrix with > cd> as.matrix function. > cd> Maybe we could detail the error message if the fir

Re: [Rd] non user-friendly error for chol2inv functions

2008-08-29 Thread Martin Maechler
> "TH" == Ted Harding <[EMAIL PROTECTED]> > on Fri, 29 Aug 2008 14:21:05 +0100 (BST) writes: TH> On 29-Aug-08 13:00:01, Martin Maechler wrote: >>> "cd" == christophe dutang <[EMAIL PROTECTED]> >>> on Fri, 29 Aug 2008 14:28:42 +0200 writes: >> cd> Yes, I do

Re: [Rd] Defining environments within functions

2008-08-29 Thread Luke Tierney
If you want to use this pattern repeatedly you can define something like makeFunWithCounter <- function(fun) { counter <- 0 list(count = function() counter, fun = function(...) { counter <<- counter + 1; fun(...)}) } and then do > fwc <- makeFunWithCount

[Rd] Security issue with javareconf script (PR#12636)

2008-08-29 Thread tcallawa
Full_Name: Tom Callaway Version: 2.7.2 OS: Fedora 10 (Linux/x86_64) Submission from: (NULL) (96.233.67.230) Recently, Debian identified a security issue with the javareconf script in R. I confirmed that this is still unfixed in R 2.7.2. The following patch resolves the issue: diff -up R-2.7.2/s

Re: [Rd] specifying compiler path in configure

2008-08-29 Thread Mark Kimpel
After reading over the relevant sections of the manual more carefully, I now see where the information is presented and I was able to get R to compile with an alternate version of gcc. On thing, however, remains unclear to me. If R is compiled with a non-default version of a compiler, are subsequen

Re: [Rd] Security issue with javareconf script (PR#12636)

2008-08-29 Thread Dirk Eddelbuettel
On 29 August 2008 at 17:35, [EMAIL PROTECTED] wrote: | Full_Name: Tom Callaway | Version: 2.7.2 | OS: Fedora 10 (Linux/x86_64) | Submission from: (NULL) (96.233.67.230) | | | Recently, Debian identified a security issue with the javareconf script in R. Yes, somewhat launched a massive list of

Re: [Rd] Security issue with javareconf script (PR#12636)

2008-08-29 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: Full_Name: Tom Callaway Version: 2.7.2 OS: Fedora 10 (Linux/x86_64) Submission from: (NULL) (96.233.67.230) Recently, Debian identified a security issue with the javareconf script in R. I confirmed that this is still unfixed in R 2.7.2. The following patch resolves the

Re: [Rd] R 2.7.2 for Windows fails to install local zip package (PR#12612)

2008-08-29 Thread Claude Rubinson
On Wed, Aug 27, 2008 at 06:54:27AM -0400, Duncan Murdoch wrote: > [EMAIL PROTECTED] wrote: >> R version 2.7.2 for Windows fails to install local (zipped) packages >> with following messages: >> >> >>> utils:::menuInstallLocal() >>> >> updating HTML package descriptions >> Error in .readRDS(

[Rd] coxph function (Survival Library) (PR#12638)

2008-08-29 Thread ana . marcos
Hi, I am pretty sure that the results of Likelihood ratio test are bigger than the real value. They are multiplied for the factor Ln(10), in this way the p-values are smaller than what they should be. The reason is that you apply the formula -2*log(exp(L(0)/exp(L(B)) and not what it should be

Re: [Rd] R 2.7.2 for Windows fails to install local zip package (PR#12639)

2008-08-29 Thread rubinson
On Wed, Aug 27, 2008 at 06:54:27AM -0400, Duncan Murdoch wrote: > [EMAIL PROTECTED] wrote: >> R version 2.7.2 for Windows fails to install local (zipped) packages >> with following messages: >> >> >>> utils:::menuInstallLocal() >>> >> updating HTML package descriptions >> Error in .readRDS(

Re: [Rd] Security issue with javareconf script (PR#12636)

2008-08-29 Thread Tom "spot" Callaway
On Fri, 2008-08-29 at 20:04 +0200, Peter Dalgaard wrote: > OK, committed. Not the easiest hole to exploit, I'd say (notice that > we > only compile something, not execute it). > > > . > > Oh, sh*! This is not portable! Needs code like INSTALL. Will refix. Sorry about that. I forgot that pe

Re: [Rd] serialize() to via temporary file is heaps faster than doing it directly (on Windows)

2008-08-29 Thread Henrik Bengtsson
I just want to re-post this thread in case it slipped through the "summer sieve" of someone that might be interested and/or has a real solution beyond my serialize2() patch. Cheers Henrik On Thu, Jul 24, 2008 at 8:10 PM, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: > Hi, > > FYI, I just notice th

Re: [Rd] locale2charset CPU overhead (PR#12633)

2008-08-29 Thread Duncan Murdoch
On 8/28/2008 3:25 PM, [EMAIL PROTECTED] wrote: Full_Name: R User Version: 2.7.2 (default binary) OS: Windows XP SP2 Submission from: (NULL) (83.25.29.163) Hello! I have conducted following experiment running simple R script: for (i in 1:1) { a<-0 for (j in 1:1000) a<-c(a,j) }

Re: [Rd] coxph function (Survival Library) (PR#12638)

2008-08-29 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: Hi, I am pretty sure that the results of Likelihood ratio test are bigger than the real value. They are multiplied for the factor Ln(10), in this way the p-values are smaller than what they should be. The reason is that you apply the formula -2*log(exp(L(0)/exp(L(B)) a

[Rd] scan after seek in text files (PR#12640)

2008-08-29 Thread alex
Full_Name: Dr. Alex Sheppard Version: 2.7.1 OS: Linux Debian Lenny Submission from: (NULL) (79.73.224.62) After scanning from an open (text) connection, then seeking, then scanning again, the second scan returns incorrect result. It looks like the first byte scanned was from the pre-seek file pos