[Rd] crash with scan(..., what=list(,,)) (PR#802)
Duncan Murdoch
murdoch@stats.uwo.ca
Fri, 05 Jan 2001 11:45:31 -0500
On Fri, 5 Jan 2001 17:11:13 +0100 (MET), you wrote in message
<200101051611.RAA27177@pubhealth.ku.dk>:
>When reading a file with scan(), the following crashes R under Solaris and
>WinNT 4.0 (versions below):
>
>> ads <- scan("Bltiadu.dat", what=list(,,))
I crash Win98 with the same sort of line; it's because list(,,) is the
same as list(), and scan isn't checking for this boundary case, I
guess...
>
>Would an error message be more logical? Note that the followings work (the
>data file has 201 lines and 3 columns):
>
>> ads <- scan("Bltiadu.dat", what=list(0,,))
>Read 603 lines
While fixing this, wouldn't it be better to change this message to
"Read 603 cases"
since in fact, only 201 lines were read, 3 cases per line?
Duncan Murdoch
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._