[Rd] Covariance calculation gives different answer than Excel (PR#13720)

2009-05-27 Thread apw
Full_Name: Amos Waterland Version: 2.8.1 OS: Ubuntu Linux Submission from: (NULL) (68.175.8.163) I calculated the covariance for a small data set as follows: X - c(1,2,3,4) Y - c(3,3,4,3) cov(X,Y) [1] 0.167 But when doing the computation with pencil and paper I get: ((-1.5)*(-0.25) +

[Rd] omission col as vector argument in hist documentation (PR#13722)

2009-05-27 Thread astokes
Full_Name: Allan Stokes Version: 2.8.1 OS: XP Submission from: (NULL) (24.108.0.245) Concerning the col argument, doc states only that col is a colour to be used to fill the bars. The default of NULL yields unfilled bars. It omits to mention that the col argument takes a vector which applies

Re: [Rd] Covariance calculation gives different answer than Excel (PR#13725)

2009-05-27 Thread murdoch
On 26/05/2009 5:50 AM, a...@us.ibm.com wrote: Full_Name: Amos Waterland Version: 2.8.1 OS: Ubuntu Linux Submission from: (NULL) (68.175.8.163) I calculated the covariance for a small data set as follows: X - c(1,2,3,4) Y - c(3,3,4,3) cov(X,Y) [1] 0.167 But when doing the

Re: [Rd] passing ... arguments to a function called by eval()

2009-05-27 Thread Richard Morey
I was still puzzled by the fact that HI managed to do it without using complicated lists, so recombed the HI source to see what I missed the first time. HI defines a second function f=function(x) passedFun(x,...) and then passes that to the C code using .Call. I had missed something subtle,

Re: [Rd] Covariance calculation gives different answer than Excel (PR#13720)

2009-05-27 Thread Duncan Murdoch
On 26/05/2009 5:50 AM, a...@us.ibm.com wrote: Full_Name: Amos Waterland Version: 2.8.1 OS: Ubuntu Linux Submission from: (NULL) (68.175.8.163) I calculated the covariance for a small data set as follows: X - c(1,2,3,4) Y - c(3,3,4,3) cov(X,Y) [1] 0.167 But when doing the computation with

Re: [Rd] using a third party DLL in my package

2009-05-27 Thread Liaw, Andy
I don't know if this applies to Seija's case, but one instance that I've ran into when problem arose only with -O3 is uninitialized variables/arrays. Adding the initialization fixed the problem. Just one thing to check, I guess. Best, Andy From: Prof Brian Ripley It is likely that this is

Re: [Rd] R package installation (PR#13726)

2009-05-27 Thread Prof Brian Ripley
This is a problem in your specification to R of the peculiarities of your system, not in R itself. You have only specified some of the settings you need, and in particular as you are using Fortran 90 code and a shared R library you need more than a typical user would. On Wed, 27 May 2009,

Re: [Rd] as.numeric(levels(factor(x))) may be a decreasing sequence

2009-05-27 Thread Martin Maechler
PS == Petr Savicky savi...@cs.cas.cz on Sat, 23 May 2009 09:44:54 +0200 writes: PS Function factor() in the current development version PS (2009-05-22) guarantees that levels are different PS character strings. However, they may represent the same PS decimal number. The

[Rd] minor correction to the r internals manual

2009-05-27 Thread Wacek Kusnierczyk
sec. 1.1 says: both types of node structure have as their first three fields a 32-bit sxpinfo header and then three pointers [...] that's *four* fields, as seen in src/include/Rinternals.h:208+: #define SEXPREC_HEADER \ struct sxpinfo_struct sxpinfo; \ struct SEXPREC *attrib; \

Re: [Rd] as.numeric(levels(factor(x))) may be a decreasing sequence

2009-05-27 Thread Wacek Kusnierczyk
Martin Maechler wrote: I have very slightly modified the changes (to get rid of -Wall warnings) and also exported the function as Rf_dropTrailing0(), and tested the result with 'make check-all' . As the change seems reasonable and consequent, and as it seems not to produce any problems in

[Rd] internal and external debugging [was: [R] step by step debugger in R?]

2009-05-27 Thread Mark.Bravington
Hello all I'm coming late to this discussion, and my comments may now be beside the point-- but I have been intending to ask what people think of the pros cons of internal and external (e.g. 'debug' package) debuggers. When I wrote 'debug', the internal debugger just didn't do what I wanted,