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

2008-11-17 Thread Wacek Kusnierczyk
Rolf Turner wrote: (Note: You *cannot* have spurious objects name FALSE (and not equal to FALSE) hanging around; R won't let you. That's why you use FALSE and not F.) yes you can, r will let you: assign(FALSE, TRUE) ls() # see FALSE get(FALSE) # see TRUE this does not matter much, as r

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

2008-11-17 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: Rolf Turner wrote: (Note: You *cannot* have spurious objects name FALSE (and not equal to FALSE) hanging around; R won't let you. That's why you use FALSE and not F.) yes you can, r will let you: assign(FALSE, TRUE) ls() # see FALSE get(FALSE) # see

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

2008-11-17 Thread hadley wickham
On Sun, Nov 16, 2008 at 7:41 PM, Simon Blomberg [EMAIL PROTECTED] 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

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

2008-11-17 Thread Duncan Murdoch
On 17/11/2008 8:03 AM, hadley wickham wrote: On Sun, Nov 16, 2008 at 7:41 PM, Simon Blomberg [EMAIL PROTECTED] 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

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

2008-11-17 Thread Henrik Bengtsson
To save my fingers and still being on the safe side, I always do: !0 [1] TRUE !1 [1] FALSE ;) ...still hackable though. /Henrik On Mon, Nov 17, 2008 at 5:25 AM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 17/11/2008 8:03 AM, hadley wickham wrote: On Sun, Nov 16, 2008 at 7:41 PM, Simon

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

2008-11-17 Thread Gabor Grothendieck
How about !!0 # FALSE !!1 # TRUE Although its one more char, its very easy to press ! twice and when you look at it its more obvious since 0 is associated with FALSE and 1 with TRUE. On Mon, Nov 17, 2008 at 12:42 PM, Henrik Bengtsson [EMAIL PROTECTED] wrote: To save my fingers and still being

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

2008-11-17 Thread Simon Blomberg
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

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

2008-11-16 Thread David C. Howell
Sampling with and without replacement I seem unable to use replace = F when I want to sample without replacement. I would think that it comes down to F is not a legitimate abbreviation for FALSE. except that Dalgaard (p. 118) uses F for FALSE and it works pairwise.t.test(folate, ventilation,

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

2008-11-16 Thread Rolf Turner
On 17/11/2008, at 1:56 PM, David C. Howell wrote: Sampling with and without replacement I seem unable to use replace = F when I want to sample without replacement. I would think that it comes down to F is not a legitimate abbreviation for FALSE. except that Dalgaard (p. 118) uses F for FALSE

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

2008-11-16 Thread Simon Blomberg
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 or any other assignment. If you re-assign T or F (which are set to TRUE and FALSE at the beginning of a session), you run into the sort of