Re: [R] Replace values according to conditions

2008-04-09 Thread Suhaila Zainudin
Thanks for all the reply. I solved the task using apply(as suggested by Hans). The tips on S-Poetry and ?Logic are very handy as well. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinf

[R] R: Replace values according to conditions

2008-04-09 Thread Guazzetti Stefano
ano -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] conto di Suhaila Zainudin Inviato: mercoledì 9 aprile 2008 9.32 A: r-help@r-project.org Oggetto: [R] Replace values according to conditions Greetings R-users, I have the following data called mydata in a data.frame Col1

Re: [R] Replace values according to conditions

2008-04-09 Thread Hans-Joerg Bibiko
On 9 Apr 2008, at 09:51, [EMAIL PROTECTED] wrote: >> I have the following data called mydata in a data.frame >> >> Col1 Col2 Col3 Col4 Col5 >> 1 2 46 7 >> 8 8 73 5 >> 4 4 56 7 >> >> I want to replace the data according to the following condit

Re: [R] Replace values according to conditions

2008-04-09 Thread Richard . Cotton
> I have the following data called mydata in a data.frame > > Col1 Col2 Col3 Col4 Col5 > 1 2 46 7 > 8 8 73 5 > 4 4 56 7 > > I want to replace the data according to the following conditions > > Condition 1 if data <= 3, replace with -1 >

[R] Replace values according to conditions

2008-04-09 Thread Suhaila Zainudin
Greetings R-users, I have the following data called mydata in a data.frame Col1 Col2 Col3 Col4 Col5 1 2 46 7 8 8 73 5 4 4 56 7 I want to replace the data according to the following conditions Condition 1 if data <= 3, replace with -1 Co