[R] Why does a[which(b == c[d])] not work?

Martin Maechler
Wed, 08 Oct 2003 13:06:24 -0000

Your question has been answered by Achim and Peter Dalgaard (at least).

Just a note:

Using
       a[which(logic)]
looks like a clumsy and inefficient way of writing
       a[ logic ]

and I think you shouldn't propagate its use ...

Martin Maechler <maechler at stat.math.ethz.ch>
http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><