Re: [Rd] 0/1 vector for indexing leads to funny behaviour (PR#8389) (maybe a documentation deficiency?)

2005-12-14 Thread Thomas Lumley
On Wed, 14 Dec 2005, Tony Plate wrote: > > That's what I was trying to say: the whole truth is that numeric index > vectors that contain positive integral quantities can also contain > zeros. Upon rereading this passage yet again, I think it is more > misleading than merely incomplete: the phrasin

Re: [Rd] 0/1 vector for indexing leads to funny behaviour (PR#8389) (maybe a documentation deficiency?)

2005-12-14 Thread Peter Dalgaard
Tony Plate <[EMAIL PROTECTED]> writes: > I appreciate the explanation that some details should not appear in the > help pages or the Introduction to R manual. > > However, I am puzzled by this part of Prof Ripley's response: > > TP> [...] "An Introduction to R" [...] says this about > TP> numer

Re: [Rd] 0/1 vector for indexing leads to funny behaviour (PR#8389) (maybe a documentation deficiency?)

2005-12-14 Thread Tony Plate
I appreciate the explanation that some details should not appear in the help pages or the Introduction to R manual. However, I am puzzled by this part of Prof Ripley's response: TP> [...] "An Introduction to R" [...] says this about TP> numeric indices: TP> 2. A vector of positive integral q

Re: [Rd] 0/1 vector for indexing leads to funny behaviour (PR#8389) (maybe a documentation deficiency?)

2005-12-13 Thread Prof Brian Ripley
?"[" says See Also: 'list', 'array', 'matrix'. '[.data.frame' and '[.factor' for the behaviour when applied to data.frame and factors. 'Syntax' for operator precedence, and the _R Language_ reference manual about indexing details. and the `indexing details' are in

Re: [Rd] 0/1 vector for indexing leads to funny behaviour (PR#8389) (maybe a documentation deficiency?)

2005-12-13 Thread ggrothendieck
The other place its discussed is in 3.4.1 of the R Language Definition: http://finzi.psych.upenn.edu/R/doc/manual/R-lang.html#Indexing-by-vectors On 12/13/05, Tony Plate <[EMAIL PROTECTED]> wrote: > Yes, 0/1 (numeric) are intended to be used as index vectors -- and they > have the semantics of nu

Re: [Rd] 0/1 vector for indexing leads to funny behaviour (PR#8389) (maybe a documentation deficiency?)

2005-12-13 Thread Gabor Grothendieck
The other place its discussed is in 3.4.1 of the R Language Definition: http://finzi.psych.upenn.edu/R/doc/manual/R-lang.html#Indexing-by-vectors On 12/13/05, Tony Plate <[EMAIL PROTECTED]> wrote: > Yes, 0/1 (numeric) are intended to be used as index vectors -- and they > have the semantics of nu

Re: [Rd] 0/1 vector for indexing leads to funny behaviour (PR#8389) (maybe a documentation deficiency?)

2005-12-13 Thread Tony Plate
Yes, 0/1 (numeric) are intended to be used as index vectors -- and they have the semantics of numeric indices, which is that 0 elements in the index are omitted from the result. This can be a very useful mode of operation in many situations. I was going to write "This is described in both the