Try this:
!list %in% c("aa", "bb")
On Fri, Jan 14, 2011 at 10:19 AM, A M Lavezzi wrote:
> Hi everybody,
>
> I have the following problem. I have a vector containing character
> elements,
> such as:
>
> list = c("aa","bb","cc","dd","ee")
>
> I want to create an index which identifies the element
it works!
thank you so much
Mario
On Fri, Jan 14, 2011 at 1:29 PM, Henrique Dallazuanna wrote:
> Try this:
>
> !list %in% c("aa", "bb")
>
> On Fri, Jan 14, 2011 at 10:19 AM, A M Lavezzi wrote:
>
>> Hi everybody,
>>
>> I have the following problem. I have a vector containing character
>> element
Try this:
!list %in% c("aa", "bb")
On Fri, Jan 14, 2011 at 10:19 AM, A M Lavezzi wrote:
> Hi everybody,
>
> I have the following problem. I have a vector containing character
> elements,
> such as:
>
> list = c("aa","bb","cc","dd","ee")
>
> I want to create an index which identifies the element
Thanks - that is exactly what I was looking for
Rainer
On Fri, Mar 14, 2008 at 1:10 PM, Henrique Dallazuanna <[EMAIL PROTECTED]> wrote:
> Try this:
>
> x[x %in% y]
>
>
>
> On 14/03/2008, Rainer M Krug <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > Consider the following code
> >
> > > x <- re
Use %in%:
x [ x %in% y ]
G.
On Fri, Mar 14, 2008 at 12:37:45PM +0200, Rainer M Krug wrote:
> Hi
>
> Consider the following code
>
> > x <- rep(1:13, 13)
>
> > y <- 1:3
>
> I want to select all elements in x which are equal to 1, 2 or 3.
>
> I know that I could use
>
> > sel <- x==y[1] | x=
Try this:
x[x %in% y]
On 14/03/2008, Rainer M Krug <[EMAIL PROTECTED]> wrote:
> Hi
>
> Consider the following code
>
> > x <- rep(1:13, 13)
>
> > y <- 1:3
>
> I want to select all elements in x which are equal to 1, 2 or 3.
>
> I know that I could use
>
> > sel <- x==y[1] | x==y[2] | x==y[3
6 matches
Mail list logo