[R] if(foo == TRUE) .. etc

Peter Dalgaard p.dalgaard at biostat.ku.dk
Wed Apr 20 14:42:55 CEST 2005


Martin Maechler <maechler at stat.math.ethz.ch> writes:

>  'T' and 'F' instead of 'TRUE' and 'FALSE' - 
>  which is against all recommendations, since
>   F <- TRUE
>   T <- FALSE
>  are valid statements, probably not common, but think what
>  happens when you accidentally have the equivalent of "T <- 0"
>  somewhere in your global enviroment!

Or as happened to me recently, slightly paraphrased: 

F <- MS/MS_res
pval <- pf(F, f1, f2, lower.tail=F)

(fortunately, R CMD check caught it in time...)

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list