<br><font size=2 face="sans-serif">Thanks a lot! That works. This will solve my problem. Otherwise I need to update lots of R functions we have developed based on R1.3.1.</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Ben Bolker <ben@zoo.ufl.edu></b></font>
<p><font size=1 face="sans-serif">10/11/2002 04:49 PM</font>
<br><font size=1 face="sans-serif">Please respond to bolker</font>
<br>
<td><font size=1 face="Arial"> </font>
<br><font size=1 face="sans-serif"> To: Ren_Yu@hgsi.com</font>
<br><font size=1 face="sans-serif"> cc: r-help@stat.math.ethz.ch</font>
<br><font size=1 face="sans-serif"> Subject: Re: [R] read.table( ... comment.char="#") truncated my data</font></table>
<br>
<br>
<br><font size=2 face="Courier New"><br>
I would guess the answer is yes (although I'm not in R-Core), but in the<br>
meanwhile you can easily override the definition with your own by putting<br>
something like<br>
<br>
old.read.table <- read.table<br>
read.table <- function(...) {<br>
old.read.table(...,comment.char="")<br>
}<br>
<br>
in your .Rprofile or .First function, which will work<br>
as long as you never use the comment.char argument explicitly<br>
with your new version of read.table ...<br>
<br>
(warning: I haven't tested this)<br>
<br>
On Fri, 11 Oct 2002 Ren_Yu@hgsi.com wrote:<br>
<br>
> Dear all,<br>
> <br>
> I found that the new feature of the comment.char="#" argument in the <br>
> read.table function truncated my data while the data set actually contains <br>
> '#'. We analyze lot of data that contain '#'. This is really annoying and <br>
> it is also not compatible earlier version of R. I searched the R archive <br>
> and found the following message for the scan function. Is it possible to <br>
> change the default to " " in read.table ?<br>
> <br>
> Thanks,<br>
> <br>
> Ren<br>
> <br>
> <br>
> <br>
> On Tue, 19 Feb 2002, Steve Cassidy wrote: <br>
> > I've just discovered the recent addition of the comment.char arg to <br>
> scan, a <br>
> > useful feature no doubt but the default value of # rather than "" breaks <br>
> my <br>
> > code which looks for # as a delimeter in a file and provides a messy <br>
> > incompatability with earlier versions of R and with Splus. <br>
> > <br>
> > Is there any chance that this default could be changed to ""? <br>
> It already has been. The NEWS for R-patched / R-devel says: <br>
> o The default has been changed to scan(comment.char="") for <br>
> consistency with earlier code (as in the previous item). <br>
> <br>
<br>
-- <br>
318 Carr Hall bolker@zoo.ufl.edu<br>
Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker<br>
Box 118525 (ph) 352-392-5697<br>
Gainesville, FL 32611-8525 (fax) 352-392-3704<br>
<br>
</font>
<br>
<br>