Message-ID: <1337928064265-4631279.post@n4.nabble.com>
Date: 2012-05-25T06:41:04Z
From: Jonsson
Subject: R does not recognise columns and rows as they are supposed to be
In-Reply-To: <E66794E69CFDE04D9A70842786030B932A9AF0@PA-MBX04.na.tibco.com>
Yes I exactly followed what you all suggested:
X<-(82:92) ; Y<-(364:369) ##### for sellected region
> extract <- double(365)
> setwd("C:\\Users\\aalyaari\\Desktop\\New folder (10)\\")
> listfile<-dir()
> for (i in 1:365) {
+ conne <- file(listfile[i], "rb")
+ file1<- readBin(conne, double(), n=360*720)
+ file2<-matrix(data=file1,ncol=720,nrow=360)
+ extract[i]<-mean(file2[X,Y],na.rm=TRUE)
+ close(conne) }
write.table(extract,"C:\\Users\\aalyaari\\Desktop\\New folder
(10)\\samregion1.txt")
But I am still getting(negative values) all values like:
-3.75E+306
-1.30E+54
-1.22E+58
and the right ones should be like:
22.25
22.76
33.25
--
View this message in context: http://r.789695.n4.nabble.com/R-does-not-recognise-columns-and-rows-as-they-are-supposed-to-be-tp4631217p4631279.html
Sent from the R help mailing list archive at Nabble.com.