s-news
[Top] [All Lists]

finding substrings

To: s-news@lists.biostat.wustl.edu
Subject: finding substrings
From: Dave Evens <devens8765@yahoo.com>
Date: Tue, 13 Sep 2005 02:23:27 -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=WQHWLGqh2UKDiZrT3TaGf8qr0FFWRYkrKhE+pfQkUN609l1GyQSlXmGrIgGolfaikZpcMqEpaHtscUZQGRKitJ75TbTbWKbHmydh4pTf9020aoXnfiGFKAAFKmdlUtoChlNiaCfAp+SkzjLP2Rz93DcpTL50/tGdCL2s+X+H8OU= ;
Dear all,

I would like to find the exact match of a
substring(/sub-vector) within a string (/vector). For
example, suppose I have

x <- c(F, F, F, T, T, F, F, T, T, F, F, T, T, T, F, F,
F, F, F, T, T, T, F, F, T, T, F, F, T, T, T)

y <- c(F, F, T, T, F)

What I would like to do is find the exact match of y
in x with possible overlapping, i.e. 

return back

2 6 23

I couldn't get it to work with matchList.

Thanks for any help in advance.

Dave




                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

<Prev in Thread] Current Thread [Next in Thread>