On Mon, Jul 22, 2013 at 11:37 AM, Prof Brian Ripley
wrote:
> This really only makes sense for a list of logical vectors of the same
> length. And by 'union' you seem to mean 'or'.
>
Indeed.
> Two approaches
>
> 1) Make a logical matrix and use apply(m, 1, any)
>
Of course! I tried apply(m, 1, "
On 22/07/2013 10:16, Liviu Andronic wrote:
Dear all,
How can I obtain the union of a list of logical values?
This really only makes sense for a list of logical vectors of the same
length. And by 'union' you seem to mean 'or'.
Two approaches
1) Make a logical matrix and use apply(m, 1, any)
Dear all,
How can I obtain the union of a list of logical values?
Consider the following:
x <- head(iris)
x[,c(2,4)] <- NA
x[c(2,4),] <- NA
# > x
# Sepal.Length Sepal.Width Petal.Length Petal.Width Species
# 1 5.1 NA 1.4 NA setosa
# 2 NA NA
3 matches
Mail list logo