| To: | s-news@lists.biostat.wustl.edu |
|---|---|
| Subject: | comparing character vectors |
| From: | Dave Evens <devens8765@yahoo.com> |
| Date: | Mon, 22 Aug 2005 05:27:59 -0700 (PDT) |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Fw3IP41DNOtPhxl4SBjtNIYQLARfSSmC+WMgjaZetH2+idklrw8FwgaPacl5ld01w1QuiBo39IylR/eszhF/8MixkzmxsLOkfKUy4+HNJ6kLBTmDOKD8d1oaoz1hvh1/3S0HerwYKt9rfj1+x+ZDANxZ+cGvFld6nnjCLaOwRP8= ; |
Dear all,
I would like to compare to 2 character vectors, where
one is a subset of the other. For example, suppose
x <- LETTERS[1:20]
and
y <- c("E", "H", "N", "Q", "R")
I would like to know where the elements of y occur in
x, i.e. in this example
5 8 14 17 18
Is there a command that does this?
Thanks in advance for any help.
Dave
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: A very simple question about datasets in S and R, Prof Brian Ripley |
|---|---|
| Next by Date: | Re: comparing character vectors, Chalvatzis, Dimitrios (Energy Wholesale) |
| Previous by Thread: | A very simple question about datasets in S and R, David Kaplan |
| Next by Thread: | Re: comparing character vectors, Chalvatzis, Dimitrios (Energy Wholesale) |
| Indexes: | [Date] [Thread] [Top] [All Lists] |