Dear All, Greetings. I am a new user of R programming. I have a large ASCII data file with 14 columns and 45000 rows. I tried to load the file using read.table(), scan(), etc. functions, but failed to load the data file properly. Missing values in my data are denoted by "NaN". I also want to exclude these lines. I don't have a column header but I would like to include the labels in plotting. All the data is in floats. Can anyone give me some short examples to open my file? Look forward for your support, Thanking you in advance, Regards, Madhavan ?-----------------------------------------------? Bomidi Lakshmi Madhavan, Ph.D Remote Sensing of Atmospheric Processes Leibniz Institute for Tropospheric Research (TROPOS) Permoserstra?e 15, D-04318 Leipzig, Germany Phone: +49 (0)341 2717-7187 (Office), +49 (0)1578 8467548 (Mobile) E-Mail: *madhavan.bomidi at tropos.de <madhavan at tropos.de>, **blmadhavan at gmail.com <blmadhavan at gmail.com>* Skype ID: *blmadhavan*, Web: *http://sat.tropos.de <https://mail.tropos.de/owa/redir.aspx?C=b471dab8af5b46d99137a92f561b4753&URL=http%3a%2f%2fwww.tropos.de>* [[alternative HTML version deleted]]
can you at least attach a sample of what your data file looks like. That is not that large of a file and it would depend on exactly how it is formatted. Is it a CSV, tab, space, semicolon, etc. separated file? What exactly have you tried and what were the results? A sample of the data would help to determine how you might want to read it. Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Fri, Jan 9, 2015 at 9:44 AM, Madhavan BL <blmadhavan at gmail.com> wrote:> Dear All, > > Greetings. I am a new user of R programming. > > I have a large ASCII data file with 14 columns and 45000 rows. I tried to > load the file using read.table(), scan(), etc. functions, but failed to > load the data file properly. Missing values in my data are denoted by > "NaN". I also want to exclude these lines. I don't have a column header but > I would like to include the labels in plotting. All the data is in floats. > > Can anyone give me some short examples to open my file? > > Look forward for your support, > > Thanking you in advance, > Regards, > Madhavan > > ?-----------------------------------------------? > > Bomidi Lakshmi Madhavan, Ph.D > Remote Sensing of Atmospheric Processes > Leibniz Institute for Tropospheric Research (TROPOS) > Permoserstra?e 15, D-04318 Leipzig, Germany > Phone: +49 (0)341 2717-7187 (Office), +49 (0)1578 8467548 (Mobile) > E-Mail: *madhavan.bomidi at tropos.de <madhavan at tropos.de>, ** > blmadhavan at gmail.com > <blmadhavan at gmail.com>* > Skype ID: *blmadhavan*, Web: *http://sat.tropos.de > < > https://mail.tropos.de/owa/redir.aspx?C=b471dab8af5b46d99137a92f561b4753&URL=http%3a%2f%2fwww.tropos.de > >* > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >[[alternative HTML version deleted]]
On Jan 9, 2015, at 6:44 AM, Madhavan BL wrote:> Dear All, > > Greetings. I am a new user of R programming. > > I have a large ASCII data file with 14 columns and 45000 rows. I tried to > load the file using read.table(), scan(), etc. functions, but failed to > load the data file properly. Missing values in my data are denoted by > "NaN". I also want to exclude these lines. I don't have a column header but > I would like to include the labels in plotting.What these "labels" you are referring to?> All the data is in floats. > > Can anyone give me some short examples to open my file?The default settings for `read.table` assume that there is no header row and that `NA` is the missing value indicator. See ?read.table for more on the default settings. If you have `NaN` as missing value you need to include an na.strings="NaN" argument in the `read.table` call. You would need to post process results to exclude rows. There is no interval skipping mechanism that I know about. `scan` assumes all lines have the same structure so answering the question about "labels" would be necessary for any advice about its use here.> > Look forward for your support, > > Thanking you in advance, > Regards, > Madhavan> [[alternative HTML version deleted]]I suggest you investigate how to configure your mail-client to respond in plain text.> > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.David Winsemius Alameda, CA, USA