Re: [Rd] y ~ X -1 , X a matrix

2010-03-18 Thread Peter Dalgaard
Ross Boylan wrote: On Thu, 2010-03-18 at 00:57 +, ted.hard...@manchester.ac.uk wrote: On 17-Mar-10 23:32:41, Ross Boylan wrote: While browsing some code I discovered a call to lm that used a formula y ~ X - 1, where X was a matrix. Looking through the documentation of formula, lm,

Re: [Rd] mean(trim=, c(NA,...), na.rm=FALSE) does not return NA

2010-03-18 Thread Prof Brian Ripley
On Tue, 16 Mar 2010, William Dunlap wrote: Both of the following should return NA, but do not in R version 2.11.0 Under development (unstable) (2010-03-07 r51225) on 32-bit Windows: Nor in any version of R in the last several years (e.g. 2.1.0) mean(c(1,10,100,NA), trim=.1) Error in

[Rd] Size of object in C

2010-03-18 Thread Saptarshi Guha
Hello, Is there a function(in R's C API), given a SEXP, that computes the size in bytes, i.e. a C equivalent of object.size() ? Thank you Saptarshi __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Size of object in C

2010-03-18 Thread Simon Urbanek
On Mar 18, 2010, at 13:39 , Saptarshi Guha wrote: Hello, Is there a function(in R's C API), given a SEXP, that computes the size in bytes, i.e. a C equivalent of object.size() ? No. But eval(LCONS(install(object.size), list1(x)), R_GlobalEnv); isn't that long ... ;) Cheers, Simon