[Rd] Indexing bug?

Berwin A Turlach berwin at maths.uwa.edu.au
Wed May 26 13:12:24 CEST 2010


G'day Duncan,

On Wed, 26 May 2010 05:57:38 -0400
Duncan Murdoch <murdoch.duncan at gmail.com> wrote:

> Is this expected behaviour?

Yes, according to the answer that this poster

https://stat.ethz.ch/pipermail/r-devel/2008-March/048674.html

got.

Indeed, the help page of '[' states:

The index object i can be numeric, logical, character or empty.
Indexing by factors is allowed and is equivalent to indexing by the
numeric codes (see factor) and not by the character values which are
printed (for which use [as.character(i)]). 

Cheers,

	Berwin



More information about the R-devel mailing list