Displaying 1 result from an estimated 1 matches for "puddycat".
Did you mean:
buddycat
2020 Feb 21
0
function(x) !is.na(x) & x "is_true(.)" etc. was: [R] How to index..
...; peter dalgaard
>>>>> on Fri, 21 Feb 2020 10:46:16 +0100 writes:
> It has isTRUE, but that is not vectorized, and in fact explicitly tests length==1, so
>> isTRUE(c(TRUE,FALSE,NA))
> [1] FALSE
>> isTRUE(c(TRUE,TRUE, TRUE)) # I thought I thaw a puddycat... ;-)
> [1] FALSE
>> Vectorize(isTRUE)(c(TRUE,FALSE,NA))
> [1] TRUE FALSE FALSE
> (The latter would be silly as an implementation of is_true, of course.)
> -pd
yes... We've had (hidden) functions in the Matrix package for
these, which can still be acce...