From jake.michaelson at gmail.com  Fri Sep 19 12:20:46 2008
From: jake.michaelson at gmail.com (Jake Michaelson)
Date: Fri, 19 Sep 2008 12:20:46 +0200
Subject: [Rd] indexing by character with identical names
In-Reply-To: <d8ad40b50809190307s70139cbah57bdd59c27591d2a@mail.gmail.com>
References: <1221815747.7356.83.camel@slipstream>
	<d8ad40b50809190307s70139cbah57bdd59c27591d2a@mail.gmail.com>
Message-ID: <1221819646.7356.89.camel@slipstream>

On Fri, 2008-09-19 at 11:07 +0100, Barry Rowlingson wrote:

>  Some people may think it sensible that indexing a vector with an
> index of length N returns a vector of length N:
> 
>  > x[c("a","b","a")]
>  a b a
>  1 2 1

I also thought of this side of it after I sent the original email, and I
realized that this probably would break a lot of stuff.

I think at the very least the documentation for '[' could be updated to
emphasize that only first matches are returned when indexing with a
character vector.

Thanks,

Jake



[Rd] indexing by character with identical names
Jake Michaelson