On Sun, Apr 16, 2006 at 12:26:29AM -0400, Luke wrote:
x - a, aab
y - a, aa, aab, aabc.
Is there any R function to get the indices of y for the elements of x, that
is, foo(x, y) will give me the index vector c(1, 3)?
match(x, y)
cu
Philipp
--
Dr. Philipp Pagel
On Sun, 2006-04-16 at 11:48 +0200, Philipp Pagel wrote:
On Sun, Apr 16, 2006 at 12:26:29AM -0400, Luke wrote:
x - a, aab
y - a, aa, aab, aabc.
Is there any R function to get the indices of y for the elements of x, that
is, foo(x, y) will give me the index vector c(1, 3)?
match(x,
Hi,
I have a string vector, say,
x - a, aab
and anther string vector, say,
y - a, aa, aab, aabc.
Is there any R function to get the indices of y for the elements of x, that
is, foo(x, y) will give me the index vector c(1, 3)?
I know i can combine apply() and grep(^aab$, y) to do it. But is