Skip to content
Prev 19259 / 63421 Next

help with read.table() function

On 1/29/2006 12:55 PM, Marc Schwartz wrote:
I don't see how this change could affect any code that currently works 
-- maybe you misunderstood the proposal?  I'm just suggesting that the 
args to functions that take input from files use file.choose() as a 
default.  For example, read.table's arg list would change from

function (file, header = FALSE, ...

to

function (file = file.choose(), header = FALSE, ...

Currently a call like read.table() dies with an error message:

 > read.table()
Error in read.table() : argument "file" is missing, with no default

With this change we wouldn't get an error here.
This isn't about fixing a bug, it's about making the user interface a 
bit less error-prone.

Duncan Murdoch