Skip to content
Prev 3870 / 63424 Next

Suggestion for comments in data files (i.e. read.table)

On Tue, 23 May 2000, Telford Tendys wrote:

            
I am sure it is not `a very small change', I'm afraid.  Basically, input is
not done in a line-oriented way. read.table uses scan and count.fields.  
Both are internal functions that work at a char-by-char level.  You will
need to add logic to skip lines, and for your rule that means adding logic
to know that # is first in a line.

My suggestion would be to allow # anywhere on the line to skip the
rest of the line, and to make sure that # inside quotes did nothing.