Message-ID: <Pine.LNX.4.44.0305071717410.5816-100000@gannet.stats>
Date: 2003-05-07T16:23:03Z
From: Brian Ripley
Subject: element of
In-Reply-To: <3EB92D5B.3030905@tuebingen.mpg.de>
Do you mean *an* element or *this* element of a matrix?
is.element or %in% for the first
== for the second.
It doesn't really make sense for a data frame, where columns can be of
arbitrary classes.
I am not sure if I have unscrambled your English correctly: if not a
simple example of what you want to do would help. (We don't need examples
of logical values, though.)
On Wed, 7 May 2003 alexander.schnee at tuebingen.mpg.de wrote:
> is there any funktion in R which i can use to check if a single value is
> element of a matrix or data.frame so that it returns me logical values
> like TRUE/FALSE.
(or possibly NA if there are NAs in the matrix?)
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595