Tena koe Robert

You could first apply paste

apply(types, 1, paste, collapse=':')

and then match.

HTH ....

Peter Alspach 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of threshold
> Sent: Wednesday, 3 December 2008 8:32 a.m.
> To: r-help@r-project.org
> Subject: [R] match
> 
> 
> Hi, I would like to check which rows of 'types.prev' matrix 
> pop up in 'types', following R in-built procedure. I tried 
> 'match' function but it works in case of the one dimensional vectors.
> Will appreciate any suggestions. 
> best, robert 
> 
> > types
>          edate    K  
>  [1,] 20060819 12.5
>  [2,] 20060819 17.5
>  [3,] 20060819 22.5
>  [4,] 20070217 12.5
>  [5,] 20060617 10.0
>  [6,] 20060617 15.0
>  [7,] 20060520 12.5
>  [8,] 20060520 15.0
>  [9,] 20060520 17.5
> [10,] 20061118 10.0
> [11,] 20061118 12.5
> [12,] 20061118 15.0
> [13,] 20061118 17.5 
> 
> > types.prev
>          edate    K  
>  [1,] 20060819 10.0
>  [2,] 20060819 12.5
>  [3,] 20060819 17.5
>  [4,] 20070217 10.0
>  [5,] 20070217 12.5
>  [6,] 20070217 15.0
>  [7,] 20060617 10.0
>  [8,] 20060617 12.5
>  [9,] 20060617 15.0
> [10,] 20060617 20.0
> [11,] 20060520 10.0
> [12,] 20060520 12.5
> [13,] 20060520 17.5
> [14,] 20061118 12.5
> [15,] 20061118 15.0
> [16,] 20061118 17.5
> 
> 
> --
> View this message in context: 
> http://www.nabble.com/match-tp20799206p20799206.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help@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.
> 

The contents of this e-mail are confidential and may be subject to legal 
privilege.
 If you are not the intended recipient you must not use, disseminate, 
distribute or
 reproduce all or any part of this e-mail or attachments.  If you have received 
this
 e-mail in error, please notify the sender and delete all material pertaining 
to this
 e-mail.  Any opinion or views expressed in this e-mail are those of the 
individual
 sender and may not represent those of The New Zealand Institute for Plant and
 Food Research Limited.

______________________________________________
R-help@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.
  • [R] match threshold
    • Re: [R] match Peter Alspach

Reply via email to