Re: [R] function <OF855C6F3B.3B46F9F2-ONCC256CD2.000EA103-CC256CD2.001008DE@livestock.org.nz>

About this list Date view Thread view Subject view Author view Attachment view

From: Andrew C. Ward (s195404@student.uq.edu.au)
Date: Wed 19 Feb 2003 - 15:21:43 EST


Message-id: <1045628503.3e53065778785@my.uq.edu.au>


!is.na(match(myvec, myscaler)) is probably what you want.

Regards,

Andrew C. Ward

CAPE Centre
Department of Chemical Engineering
The University of Queensland
Brisbane Qld 4072 Australia
andreww@cheque.uq.edu.au

Quoting skayis@lic.co.nz:

> Dear R users,
>
> I have some R code and trying to understand it. I have a vector
>
> myvec
> [1] 24 24 10 10 10 10 10 44 44 44 45 45 45 54 54 54 54 42 42
>
> and a scaler
>
> myscaler
> [1] 10
>
> The following function:
> match(myvec,myscaler)!="NA"
>
> returns :
>
> [1] NA NA TRUE TRUE TRUE TRUE TRUE NA NA NA NA NA NA NA
> NA NA NA NA NA
>
> I need a return
>
> FALSE FALSE TRUE TRUE TRUE TRUE TRUE FALSE FALSE ...FALSE
>
> Is there any function to perform this?
>
> Any help deeply appreciated.
>
> Kind Regards
>
> Seyit Ali
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help
>

______________________________________________
R-help@stat.math.ethz.ch mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:22 EST