Hi guys, I need your help!! My goal is to make a csv file from ncdf file. This is the code i've used :
> hyo=open.ncdf("C:/CRUTEM3.nc") > hyo [1] "file C:/CRUTEM3.nc has 4 dimensions:" [1] "longitude Size: 72" [1] "latitude Size: 36" [1] "unspecified Size: 1" [1] "t Size: 1916" [1] "------------------------" [1] "file C:/CRUTEM3.nc has 1 variables:" [1] "float temp[longitude,latitude,unspecified,t] Longname:Temperature T Missval:2.00000004008175e+20" > data2=get.var.ncdf(hyo) > write.csv(data2,file="C:/ple.csv") But the problem is, I expected this data would be 17000 * 72 (row* col) ; but, it is the other way around. 72*17000 Because the maximum col number in excel is 16383, this cvs file doesn't show all data. Obviously, I need to transpose the matrix.. I tried to use transpose function but failed. > bbb=t(data2) Error in t.default(data2) : argument is not a matrix > ccc=t(hyo) > ccc [1] "file has dimensions:" Error in if (nc$ndims > 0) for (i in 1:nc$ndims) { : argument is of length zero Teach me how to deal with this problem. Thank you very much. -Hyo [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.