Re: [R] prblem with NA

2009-01-06 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 06.01.2009 02:29:18: Hello - kayj wrote: Hi all I have a data set with the total number of columns =ncol, and the total number of rows=nrow. I am trying to loop over the values and id the value is less than or equal to 100 to be

Re: [R] prblem with NA

2009-01-06 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: Prof Brian Ripley wrote: On Tue, 6 Jan 2009, Petr PIKAL wrote: [...] Logical vectors can be treated like numeric with TRUE=1 and FALSE=0, More accurately, 'like integer' ('numeric' often means 'double'). why would this be more accurate?

Re: [R] prblem with NA

2009-01-06 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 06.01.2009 10:02:12: On Tue, 6 Jan 2009, Petr PIKAL wrote: [...] Logical vectors can be treated like numeric with TRUE=1 and FALSE=0, More accurately, 'like integer' ('numeric' often means 'double'). I learned that somewhere but it is not

[R] prblem with NA

2009-01-05 Thread kayj
Hi all I have a data set with the total number of columns =ncol, and the total number of rows=nrow. I am trying to loop over the values and id the value is less than or equal to 100 to be changed to 1. if the value is greater than 100 , to be changed to 0. if NA , let X[i,j]=NA. I ran into a