Re: [R] Putting a NULL in a list (as cannot pass NA to C++)

2007-12-03 Thread Charles C. Berry
On Mon, 3 Dec 2007, Rees, David wrote: > Hi, > > If I do the following I can have a NULL in a list > >> x <- list( 1, list(3,NULL,4), 5 ) >> x > [[1]] > [1] 1 > > [[2]] > [[2]][[1]] > [1] 3 > > [[2]][[2]] > NULL > > [[2]][[3]] > [1] 4 > > > [[3]] > [1] 5 > > This is a good thing for me as it can

[R] Putting a NULL in a list (as cannot pass NA to C++)

2007-12-03 Thread Rees, David
Hi, If I do the following I can have a NULL in a list > x <- list( 1, list(3,NULL,4), 5 ) > x [[1]] [1] 1 [[2]] [[2]][[1]] [1] 3 [[2]][[2]] NULL [[2]][[3]] [1] 4 [[3]] [1] 5 This is a good thing for me as it can be passed through into C++ where I can know the value is missing. (Can't seem