"Coding conventions" for R: Use TRUE & FALSE, and not T & F
Martin Maechler
Martin Maechler <maechler@stat.math.ethz.ch>
Wed, 1 Jul 1998 12:26:17 +0200
The reason being
a design decision of a while ago
that "T" and "F" shouldn't be reserved words in R as they are in S-plus.
Hence, T & F are just variables being set to TRUE and FALSE respectively;
they *can* be overwritten by the user which is very useful e.g.,
when you do
mydat <- read.table(file, header =TRUE)
and the file has variable names "T" or "F" and then do attach(mydat).
Even more important is the situation when you have factors with levels
"T" or "F" which (I think to remember) is a pain in S.
-----------
Consequence
-----------
Package writers
(including R-core'ers incorporating other people's patches..):
*Please* always use TRUE and FALSE
Kurt: Part of the above should definitely go into the
R-FAQ "Differences S & R"
Martin Maechler <maechler@stat.math.ethz.ch> <><
Seminar fuer Statistik, ETH-Zentrum SOL G1; Sonneggstr.33
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1086
http://www.stat.math.ethz.ch/~maechler/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._