Re: [Rd] How to build a list with missing values? What is missing, anyway?

2012-10-04 Thread peter dalgaard
On Oct 5, 2012, at 03:31 , Peter Meilstrup wrote: > On Thu, Oct 4, 2012 at 6:12 PM, Bert Gunter wrote: >> The R Language definition manual explains all of this. Read it. > > I always reread that before I post to this list. > > The only relevant mention of "missing" in the R Language Definition

Re: [Rd] How to build a list with missing values? What is missing, anyway?

2012-10-04 Thread Peter Meilstrup
On Thu, Oct 4, 2012 at 6:12 PM, Bert Gunter wrote: > The R Language definition manual explains all of this. Read it. I always reread that before I post to this list. The only relevant mention of "missing" in the R Language Definition that I could find were in section 4.1.2 on page 25, and that s

Re: [Rd] identical() fails to compare isS4() to TRUE

2012-10-04 Thread Martin Morgan
On 10/04/2012 04:05 PM, Duncan Murdoch wrote: On 12-10-04 5:50 PM, Martin Morgan wrote: On 10/04/2012 02:23 PM, Duncan Murdoch wrote: On 12-10-04 4:57 PM, Martin Morgan wrote: > setClass("A", "integer") > isS4(new("A")) [1] TRUE > identical(isS4(new("A")), TRUE) [1] FALSE > sessi

Re: [Rd] identical() fails to compare isS4() to TRUE

2012-10-04 Thread Duncan Murdoch
On 12-10-04 5:50 PM, Martin Morgan wrote: On 10/04/2012 02:23 PM, Duncan Murdoch wrote: On 12-10-04 4:57 PM, Martin Morgan wrote: > setClass("A", "integer") > isS4(new("A")) [1] TRUE > identical(isS4(new("A")), TRUE) [1] FALSE > sessionInfo() R Under development (unstable) (2012-1

Re: [Rd] How to build a list with missing values? What is missing, anyway?

2012-10-04 Thread Peter Meilstrup
On Wed, Oct 3, 2012 at 11:21 PM, Josh O'Brien wrote: > >>Say I have argnames <- c("a", "b", "c"). > >From that I want to construct the equivalent of alist(a=, b=, c=). > > Here's a one liner that'll do that for you: > > argnames <- letters[1:3] > setNames(rep(list(bquote()), length(argnames)), arg

Re: [Rd] identical() fails to compare isS4() to TRUE

2012-10-04 Thread Martin Morgan
On 10/04/2012 02:23 PM, Duncan Murdoch wrote: On 12-10-04 4:57 PM, Martin Morgan wrote: > setClass("A", "integer") > isS4(new("A")) [1] TRUE > identical(isS4(new("A")), TRUE) [1] FALSE > sessionInfo() R Under development (unstable) (2012-10-04 r60876) Platform: x86_64-unknown-linux-gnu

Re: [Rd] identical() fails to compare isS4() to TRUE

2012-10-04 Thread Duncan Murdoch
On 12-10-04 4:57 PM, Martin Morgan wrote: > setClass("A", "integer") > isS4(new("A")) [1] TRUE > identical(isS4(new("A")), TRUE) [1] FALSE > sessionInfo() R Under development (unstable) (2012-10-04 r60876) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8

[Rd] identical() fails to compare isS4() to TRUE

2012-10-04 Thread Martin Morgan
> setClass("A", "integer") > isS4(new("A")) [1] TRUE > identical(isS4(new("A")), TRUE) [1] FALSE > sessionInfo() R Under development (unstable) (2012-10-04 r60876) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC

Re: [Rd] Fastest non-overlapping binning mean function out there?

2012-10-04 Thread Henrik Bengtsson
Thank you all - I appreciate all your suggestions. My post was mainly to check if there's already an existing and fast implementation out there. I've ended up adopting Martin's first proposal. Something like this: #include #include #include SEXP binMeans(SEXP y, SEXP x, SEXP bx, SEXP retCou