Skip to content
Back to formatted view

Raw Message

Message-ID: <CA+vqiLG2mAPK6DnWW5-Rd7B76o10AVaOKyozFHOiy4PDbf-OEA@mail.gmail.com>
Date: 2012-05-21T13:38:54Z
From: Ista Zahn
Subject: all occurences of an element in a vector
In-Reply-To: <1337606453.33502.YahooMailNeo@web125404.mail.ne1.yahoo.com>

Hi Carol,

I'm not sure what a "sub-vector in a vector" is, but I think you might
be looking for ?grep

Best,
Ista

On Mon, May 21, 2012 at 9:20 AM, carol white <wht_crl at yahoo.com> wrote:
> Hi,
> How do you identify all occurences of an element or a sub-vector in a vector as opposed to match, %in%, and intersect which find the first occurrence of an element?
>
> Cheers,
>
> Carol
>
> ? ? ? ?[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.