[R] A slight trap in read.table/read.csv.
Patrick Connolly
p_connolly at slingshot.co.nz
Tue Mar 9 09:11:20 CET 2010
On Tue, 09-Mar-2010 at 08:14AM +0100, Petr PIKAL wrote:
|> I would respectfully oppose it. It may be quite convenient for making code
|> for functions and other programming stuff but all using R more or less in
|> interactive way this change could be quite a burden especially when there
|> are many functions which use TRUE/FALSE for setting its parameters.
|>
|> In those (and many others) instances I almost exclusively use T/F
|> shortcut.
|>
|> read.delim(file, header = TRUE, sep = "\t", quote="\"", dec=".", fill =
|> TRUE, comment.char="", ...)
|> lm(formula, data, subset, weights, na.action,method = "qr", model = TRUE,
|> x = FALSE, y = FALSE, qr = TRUE, singular.ok = TRUE, contrasts = NULL,
|> offset, ...)
If you use ESS, you have the benefit of completions. Depending on
what else could begin with T or F, you can press the TAB key after
typing the first letter or two. Admittedly, three keystrokes isn't
much shorter than TRUE -- but they are all with the left hand. You
always get at least a 40% discount with FALSE. :-) -- except in the
'unlikely event' that you have objects named FALLOW or something
else a lot like FALSE.
|>
|> If this had to be changed I would vote for some change which allow users
|> some other shortcut for setting interactively parameters in functions.
|>
|> Regards
|> Petr
|>
|>
|>
|> > >
|> > > The only immediate solution to this accretion of overly clever
|> > > behavior would be for someone to write new functions (say,
|> > > Read.csv) that didn't do all those conversions behind the
|> > > scenes. I'm not about to do that. Are you?
|> >
|> >
|> > NFL!!!
|> >
|> > cheers,
|> >
|> > Rolf
|> >
|> > ######################################################################
|> > Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
|> >
|> > ______________________________________________
|> > R-help at r-project.org mailing list
|> > https://stat.ethz.ch/mailman/listinfo/r-help
|> > PLEASE do read the posting guide
|> http://www.R-project.org/posting-guide.html
|> > and provide commented, minimal, self-contained, reproducible code.
|>
|> ______________________________________________
|> R-help at r-project.org mailing list
|> https://stat.ethz.ch/mailman/listinfo/r-help
|> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
|> and provide commented, minimal, self-contained, reproducible code.
--
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
___ Patrick Connolly
{~._.~} Great minds discuss ideas
_( Y )_ Average minds discuss events
(:_~*~_:) Small minds discuss people
(_)-(_) ..... Eleanor Roosevelt
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
More information about the R-help
mailing list