Message-ID: <00a101c314b5$138f7270$0201a8c0@MARC>
Date: 2003-05-07T16:24:02Z
From: Marc Schwartz
Subject: element of
In-Reply-To: <3EB92D5B.3030905@tuebingen.mpg.de>
>-----Original Message-----
>From: r-help-bounces at stat.math.ethz.ch
>[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of
>alexander.schnee at tuebingen.mpg.de
>Sent: Wednesday, May 07, 2003 10:59 AM
>To: r-help at stat.math.ethz.ch
>Subject: [R] element of
>
>
>Dear all,
>
>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.
>
>Thanks in advance for your help!
See help("%in%") which will give you a TRUE/FALSE value.
You can also use which() to get the actual position of the element in
the data structure. See help("which") for more information on that
function.
HTH,
Marc Schwartz