Re: [R] Replacing cretin value in a file

2012-05-13 Thread Ken Hutchison
Perhaps you are in the first circle of the R Inferno? Ken Hutchison On May 13, 2012, at 9:31 AM, Berend Hasselman wrote: > > On 13-05-2012, at 15:08, Jonsson wrote: > >> Dear All, >> >> I am trying to replace a value of 528.8933 to - in my file >> >> t<- file("C:\\Users\\Amin\\Des

Re: [R] Replacing cretin value in a file

2012-05-13 Thread Berend Hasselman
On 13-05-2012, at 15:08, Jonsson wrote: > Dear All, > > I am trying to replace a value of 528.8933 to - in my file > > t<- file("C:\\Users\\Amin\\Desktop\\1999n_Resample11.img", "rb") > e=readBin(t, double(), size=4,n=720*360, signed=TRUE) > e[e != -] <- e[e != -]*0.0099 + 477.6

Re: [R] Replacing cretin value in a file

2012-05-13 Thread David Winsemius
On May 13, 2012, at 9:08 AM, Jonsson wrote: Dear All, I am trying to replace a value of 528.8933 to - in my file t<- file("C:\\Users\\Amin\\Desktop\\1999n_Resample11.img", "rb") e=readBin(t, double(), size=4,n=720*360, signed=TRUE) e[e != -] <- e[e != -]*0.0099 + 477.65 -273.15 T

Re: [R] Replacing cretin value in a file

2012-05-13 Thread Jonsson
Dear All, I am trying to replace a value of 528.8933 to - in my file t<- file("C:\\Users\\Amin\\Desktop\\1999n_Resample11.img", "rb") e=readBin(t, double(), size=4,n=720*360, signed=TRUE) e[e != -] <- e[e != -]*0.0099 + 477.65 -273.15 This code given above would read a bina

Re: [R] Replacing cretin value in a file

2012-05-13 Thread David Winsemius
On May 13, 2012, at 8:12 AM, Jonsson wrote: Dear Jim, You may forget to add your suggestions because what I see is just my post The suggestion was to read the referenced FAQ. PLEASE do read the posting guide http://www.R-project.org/posting-guide.html And while you are referencing the

Re: [R] Replacing cretin value in a file

2012-05-13 Thread Jonsson
Dear Jim, You may forget to add your suggestions because what I see is just my post -- View this message in context: http://r.789695.n4.nabble.com/Replacing-cretin-value-in-a-file-tp4629840p4629843.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Replacing cretin value in a file

2012-05-13 Thread Jim Holtman
FAQ 7.31 Sent from my iPad On May 13, 2012, at 7:52, Jonsson wrote: > Dear All, > > I am trying to replace a value of 528.8933 to - in my file > > t<- file("C:\\Users\\Amin\\Desktop\\1999n_Resample11.img", "rb") > e=readBin(t, double(), size=4,n=720*360, signed=TRUE) > e[e != -] <- e[

[R] Replacing cretin value in a file

2012-05-13 Thread Jonsson
Dear All, I am trying to replace a value of 528.8933 to - in my file t<- file("C:\\Users\\Amin\\Desktop\\1999n_Resample11.img", "rb") e=readBin(t, double(), size=4,n=720*360, signed=TRUE) e[e != -] <- e[e != -]*0.0099 + 477.65 -273.15 ##worked well and values heve