[R] Block comments in R?

Gabor Grothendieck ggrothendieck at gmail.com
Thu Oct 5 18:29:07 CEST 2006


There are two places that I find the current way it works to be
less than ideal although its not that bad either:

1 .when one wants to define strings that have quotes then
one must be careful to use double quoted strings to contain
single quotes and single quoted strings to contain double quotes
or if one needs both then one is into the complexities of multiple
backslashes.  Enhancing sQuote and dQuote might help somewhat
in this regards to allow them to be used in more situations but
having an extended syntax might be the best.

2. Sometime I like to define a file inline so that it is
defined like this:

Lines <- "1 2
3 4"
read.table(textConnection(Lines))

I haven't hit the size limit on the character string yet (I usually do this
with small config style files) but suspect that I may if I start using this
for data.  What is the limit anyways?

On 10/5/06, Martin Maechler <maechler at stat.math.ethz.ch> wrote:
> >>>>> "Duncan" == Duncan Murdoch <murdoch at stats.uwo.ca>
> >>>>>     on Thu, 05 Oct 2006 11:13:03 -0400 writes:
>
>    Duncan> On 10/5/2006 10:57 AM, Martin Maechler wrote:
>    >>
>    >> <##  ....
>    >> ...
>    >> ##>
>    >>
>    >> but I'm not yet fond of the general idea.
>    >> Martin
>
>    Duncan> Is that just because you don't need it, or that you see something
>    Duncan> objectionable in it?
>
> The combination: It complicates the S language (slightly) which
> I think is "too expensive" given that I don't see the need for
> it ("smart editors ...";  if(FALSE) { .. }).
>
> {But my feelings are not very strong here probably mostly
>  because I haven't thought very long about it.}
>
> Martin
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>



More information about the R-help mailing list