Anyone know whether this is intentional, and by which rationale?
(R-devel on RedHat, but hardly new)


> l <- data.frame(a=rpois(10,1)>0,b=rpois(10,1)>0)
> apply(l,1,which)
Error in FUN(newX[, i], ...) : argument to "which" is not logical
> lapply(l,mode)
$a
[1] "logical"

$b
[1] "logical"

> mode(as.matrix(l))
[1] "character"


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - ([EMAIL PROTECTED])             FAX: (+45) 35327907

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel

Reply via email to