Skip to content
Prev 3907 / 63424 Next

read.table and strip.white

On 1 Jun 2000, Peter Dalgaard BSA wrote:

            
No, those are the quotes being converted to `.'  The original example
was

"col1", "col2", "col3"

Now in R the quoting mechanism removes the quotes, but with quote=""
one (now) gets X.col1. etc.  S-PLUS does not have the quoting mechanism,
and leading spaces just disappear (as shown in my original posting).

I've added this in, so now read.table has check.names=TRUE and
strip.white=FALSE arguments, and the header line is always stripped
but only converted if check.names is true.  If you want leading spaces
in the col names, you will need to use quotes and check.names=FALSE,
but you can still do it.