p.dalgaard at biostat.ku.dk
Wed May 23 01:05:54 CEST 2007
Vladimir Dergachev wrote:
>> I think DTL's suggestion would be most useful when putting a lot of code
>> in a string, where the escapes make the code harder to read. For
>> example, just about any function using a complicated regular expression.
> Also anything using .Tcl(). Quotes in data frame definition are useful because
> they could be employed to delimit text fields with spaces in them.
.Tcl() is usually the wrong solution anyway, you really should use tcl()
unless absolutely necessary.
In some contexts (probably not when using source() ),
read.table(stdin()) does the trick too, as does reading from a pipe()
connection, at least on Unix/Linux. The latter can be useful to filter
out prompt characters.
More information about the R-devel