Re: [R] table lookup n R

From: Anne <anne.piotet_at_urbanet.ch>
Date: Tue 13 Jul 2004 - 23:11:10 EST

Thank you! It should do the job... (it was jeust a question to know where to look!)
Anne

> See match(), %in% and related functions.
>
> Description:
>
> 'match' returns a vector of the positions of (first) matches of its
> first argument in its second.
>
> '%in%' is a more intuitive interface as a binary operator, which returns
> a logical vector indicating if there is a match or not for its left
> operand.
>
>
>
> On Tue, 2004-07-13 at 13:34, Anne wrote:
> > Hello R helpers!
> > I looked but did not find a table-lookup R-utility. I could use a loop
to do the job (old FORTRAN/C habits die hard) but if I have a big table in which I have to search for the values corresponding to a vector, I end up logically with a double loop.
> > Is there already such a utility? Otherwise, is there a way without
loops?
> >
> > Thanks as always
> > Anne
> > ----------------------------------------------------
> > Anne Piotet
> > Tel: +41 79 359 83 32 (mobile)
> > Email: anne.piotet@m-td.com
> > ---------------------------------------------------
> > M-TD Modelling and Technology Development
> > PSE-C
> > CH-1015 Lausanne
> > Switzerland
> > Tel: +41 21 693 83 98
> > Fax: +41 21 646 41 33
> > --------------------------------------------------
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
> >
>
>



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jul 13 23:19:39 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 02:35:50 EST