Re: [R] Find solution for an error in the condition of if

2010-05-03 Thread Duncan Murdoch
On 03/05/2010 2:43 PM, anderson nuel wrote: I will sur that problem is coming from the first part of the test. data[pa,k] is a vector because pa is a vector. Coud you help me to solve this error. If you want to test that all elements match, you should use all(data[pa, k] == df[, j]) &&

Re: [R] Find solution for an error in the condition of if

2010-05-03 Thread anderson nuel
I will sur that problem is coming from the first part of the test. data[pa,k] is a vector because pa is a vector. Coud you help me to solve this error. Best Regards 2010/4/30 Duncan Murdoch > On 30/04/2010 4:19 AM, anderson nuel wrote: > >> Dear r-help, >> >> Could you help me to find a

Re: [R] Find solution for an error in the condition of if

2010-04-30 Thread anderson nuel
> warnings() 1: In if ((data[pa, k] == df[, j]) & (data[ch, k] == i)) { ... : the condition has length>1 ,and only the first element is used I add & between the two conditions..it solve the problem. But , it gives a >> false result. >> >> Best Regards >> > > > [[alternative HTML versi

Re: [R] Find solution for an error in the condition of if

2010-04-30 Thread Duncan Murdoch
On 30/04/2010 4:19 AM, anderson nuel wrote: Dear r-help, Could you help me to find a solution for this error: Il y a eu 50 avis ou plus (utilisez warnings() pour voir les 50 premiers) warnings() Messages d'avis : 1: In if ((data[pa, k] == df[, j]) & (data[ch, k] == i)) { ... : la c

Re: [R] Find solution for an error in the condition of if

2010-04-30 Thread Mohamed Lajnef
Dear Nuel, could you send the error messages in English please. Adds & between the two conditions and try again if ( (data[pa,k]== df[,j]) && (data[ch,k]==i)) Best M anderson nuel a écrit : Dear r-help, Could you help me to find a solution for this error: Il y a eu 50 avis ou plus (util

[R] Find solution for an error in the condition of if

2010-04-30 Thread anderson nuel
Dear r-help, Could you help me to find a solution for this error: Il y a eu 50 avis ou plus (utilisez warnings() pour voir les 50 premiers) > warnings() Messages d'avis : 1: In if ((data[pa, k] == df[, j]) & (data[ch, k] == i)) { ... : la condition a une longueur > 1 et seul le premier élément