Dear R-users, I am struggling to directly read an "op.gz" file into R. NOAA kindly provides daily weather data on their FTP server for download.
> sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252   LC_MONETARY=English_United Kingdom.1252 [4] LC_NUMERIC=C                           LC_TIME=English_United Kingdom.1252   attached base packages: [1] stats    graphics grDevices utils    datasets methods  base    loaded via a namespace (and not attached): [1] tools_2.15.1 Here is the data set in question: x <- read.csv(file="ftp://ftp.ncdc.noaa.gov/pub/data/gsod/2012/285880-99999-2012.op.gz", skip = 1, sep = "") and "structure" returns some incomprehensible gibberish: > str(x) 'data.frame':  70 obs. of 6 variables:  $ X4à tYd...ÃÃ8.Ã¥WD...ëü.ïÃ.X.QTñVP..                                                                                                                     : Factor w/ 70 levels "\005~4èdÅÃÃE\031y\020ÿú\035JëïÃIËÃÃ\021â BÃÃR{žYkv\035`âì°a\017Z\021à sPâeÃhÃÃ""| __truncated__,..: 44 13 56 64 28 23 67 3 2 33 ...  $ X.öoMýÃT..ú_...ÃÃgÃ7.â..Tþ.üÃ.ª...5ÃJ...žÃÃj.QÃ..ã.eà ÆÃGmòýçºg..a...Ãæ.J..à .ãsç.êŠ.û.ÃklsUDÃ.Å ..âU...u1.zÃ.WÃ..x...3._..E.ò.ÃZD.ïoÃÃ.dvæ....òk.C.y...8h: Factor w/ 41 levels "","\025ç\016\vòi;§4Æñ\002\001Pâá\0025¶â¢Ã¢Ã{ÃÃâ¢Â¹=ä4&ðw\\\\Q´âºÂô\"hnà â¢â°I¨à Šb*ªš\035b\b>6ÃÃ$W!ÃÃR=¨\022âPqË[»j\004$TÃâ¢3²*ñ%à ÂNââº\"| __truncated__,..: 1 1 1 39 1 1 1 8 1 5 ...  $ X.iÅ.yÃû..ý2.h..ûÃ7.ãJ.3k..jLm...Q..uYÃJä.K.zkU.8.öÃ..Y.7.3...üÃîA.Ã.3ûÃ..Z..5...âš.                                                                   : Factor w/ 29 levels "","\001qÃ^+nê1",..: 1 1 1 4 1 1 1 14 1 6 ...  $ X.îFd.m.Å ..v.                                                                                                                                          : Factor w/ 17 levels ""," ´SL\aÅ¡Ãð\035d)â¼$ÃZüò¶îÃJÃâäþâ B6Ã¥\006%5l[⼚\025a\024ñï+gT+3",..: 1 1 1 16 1 1 1 1 1 1 ...  $ ÿA..E.ŸJkEZ.ÃÃ.á.ë.......Å.z..Ã.z..Å..òÃ.ÃÃãg.ö                                                                                                        : Factor w/ 8 levels "","\001S\177¿\017iSÃÃiÃÃ#\017\"UgÃ:i´Ã\016pÃ\031UÃéD""| __truncated__,..: 1 1 1 1 1 1 1 1 1 1 ...  $ X..oðçnPÃoÃWõj.éÃ..B..Ãÿë.Qêù...ø     While I can manually open and read the op.gz file in a text editor, read.csv() or read.table() the imported file is simply unreadable. How can I best get the job done? Any pointers, suggestions, ideas most welcome!! Thanks in advance! Bernd [[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.