[R] R does not recognise columns and rows as they are supposed to be

Jonsson amen.alyaari at Bordeaux.inra.fr
Fri May 25 08:41:04 CEST 2012


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.



More information about the R-help mailing list