Skip to content
Prev 309524 / 398506 Next

extracting information from txt file

On Oct 31, 2012, at 9:46 AM, chuck.01 wrote:

            
That "# (-1)" is fairly cryptic to my reading, but it appears you are seeing the behavior of the "3" character in terminating input for comments. Changing the comment character in the call to read.table will allow input from that line.

?read.table

You will need to read only the first 5 or 6 lines first, then execute a separate read.table while skipping input from those lines as well as the variable list that forms a secondary header.
V1                                       V2
1          Dataset               EMAP Stream Chemistry Data
2        File Name                                   chmval
3     Date Created                                 02/22/99
4      # Variables                                       75
5 # Header Records                                       85
6   # Data Records                                      711
David Winsemius, MD
Alameda, CA, USA