[R] The use of F for False and T for True

Simon Blomberg s.blomberg1 at uq.edu.au
Tue Nov 18 00:25:14 CET 2008


Fair enough. But I find my interactive data analysis jobs quickly get
big enough (data manipulation, a series of model fits, some customised
output) for the analysis script to turn into something that looks like a
program. Of course, YMMV. I also get annoyed at code that uses = for
assignment outside function calls. So I may be a bit pedantic when it
comes to coding style. But I still believe that good style is worth
aiming for. Should R assume some basic proficiency in touch typing? :-)

Cheers,

Simon.

On Mon, 2008-11-17 at 07:03 -0600, hadley wickham wrote:
> On Sun, Nov 16, 2008 at 7:41 PM, Simon Blomberg <s.blomberg1 at uq.edu.au> wrote:
> > It is better programming practice to use FALSE for false and TRUE for
> > true, and not F and T. This is because it is quite legal to do this:
> >
> > T <- FALSE
> > F <- TRUE
> 
> It may be better programming practice, but is it better interactive
> data analysis practice?  R isn't just a programming language, and
> there are lots of good reasons to provide shortcuts that reduce
> typing.  It's very easy to forget that most people can't touch type at
> a decent speed, and every key press less helps them get their ideas
> from their head to the computer faster.
> 
> Hadley
> 
-- 
Simon Blomberg, BSc (Hons), PhD, MAppStat. 
Lecturer and Consultant Statistician 
Faculty of Biological and Chemical Sciences 
The University of Queensland 
St. Lucia Queensland 4072 
Australia
Room 320 Goddard Building (8)
T: +61 7 3365 2506
http://www.uq.edu.au/~uqsblomb
email: S.Blomberg1_at_uq.edu.au

Policies:
1.  I will NOT analyse your data for you.
2.  Your deadline is your problem.

The combination of some data and an aching desire for 
an answer does not ensure that a reasonable answer can 
be extracted from a given body of data. - John Tukey.



More information about the R-help mailing list