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

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Wed 20 Apr 2005 - 22:42:55 EST

Martin Maechler <maechler@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@biostat.ku.dk)             FAX: (+45) 35327907

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Wed Apr 20 23:01:26 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:17 EST