Displaying 2 results from an estimated 2 matches for "glo_".
Did you mean:
gl_
2013 Jan 17
2
How to calculate monthly average from daily files in R?
...s, readBin , double() , size =
4 ,n =360 * 720 , signed =T)))
## take the means across the 30 files
results[[length(results) + 1L]]<- colMeans(x)}
close(x)
for (i in seq_along(results)){
fileName <- sprintf("C:/New folder/glo_%d.flt", i)
writeBin(as.double(results[[i]]), fileName, size = 4)}
--
View this message in context: http://r.789695.n4.nabble.com/How-to-calculate-monthly-average-from-daily-files-in-R-tp4655869.html
Sent from the R help mailing list archive at Nabble.com.
2012 Apr 26
2
write to M, using row and columns taken from A and B, with values from C
...D_200201.bin", "rb")
C= readBin(wind, integer(), size = 2, n = 248*67420, signed = TRUE) ##it
has 67420 columns and 248 rows
for (i in seq_along(C)){
for (i in (1:67420)) {
M(A(i), B(i)) = C(i)
}}
for (i in seq_along(M)){
fileName <- sprintf("C:/New folder/glo_%d.flt", i)
writeBin(as.double(M[[i]]), fileName, size = 4)} ## for writing each row to
to a new file
--
View this message in context: http://r.789695.n4.nabble.com/write-to-M-using-row-and-columns-taken-from-A-and-B-with-values-from-C-tp4589197p4589197.html
Sent from the R help mailing list a...