Another alternative:
do.call('cbind', l[!sapply(l, function(x)all(is.na(x)))])
On 11/2/07, Petr PIKAL <[EMAIL PROTECTED]> wrote:
> Hi
>
> [EMAIL PROTECTED] napsal dne 02.11.2007 12:00:09:
>
> > Thanks,
> >
> > I have the case that there is a NA in the list. This should not be a
> column.
> > Bu
Hi
[EMAIL PROTECTED] napsal dne 02.11.2007 12:00:09:
> Thanks,
>
> I have the case that there is a NA in the list. This should not be a
column.
> But na.omit(l) does not work for lists. How to remove NAs from a list?
>
> l <- list(c(1,2,3),NA,c(1,2,3))
> mat <- do.call(cbind, l)
If number of
Thanks,
I have the case that there is a NA in the list. This should not be a column.
But na.omit(l) does not work for lists. How to remove NAs from a list?
l <- list(c(1,2,3),NA,c(1,2,3))
mat <- do.call(cbind, l)
Best
Markus
Dimitris Rizopoulos schrieb:
> you can use do.call(), e.g.,
>
> do.ca
3 matches
Mail list logo