search for: resultsr

Displaying 1 result from an estimated 1 matches for "resultsr".

Did you mean: results
2013 Jan 24
0
How to add a function to another written code?
...(dir2) file_tot<-array(dim=c(1440,720,12,2)) for(i in 1:length(dir1)){ file_tot[,,i,1] <- readBin(dir1[i], numeric(), size = 4 ,n = 1440 * 720 , signed = T) file_tot[,,i,2] <- readBin(dir2[i], numeric(), size = 4 ,n = 1440 * 720 , signed = T) } resultsr<-apply(file_tot,c(1,2),function(x){cor(x[,1],x[,2])}) to.write = file(paste("C:\\corrCCIandSMOS2010.bin",sep=""),"wb") writeBin(as.double(resultsr), to.write, size = 4) I am gratefull for any ideas -- View this message in context: http...