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
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
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
> 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
>
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
5 matches
Mail list logo