[R] Continuation and parse

Philippe Grosjean phgrosjean at sciviews.org
Wed Jun 28 15:24:07 CEST 2006


Well, you haven't used the search engines with the right key: the magic 
words are:

 > RSiteSearch("incomplete line")

With the first document being my query (almost two years ago), and the 
second one being Peter Dalgaard answer. You must adapt it to cope with 
internationalization, but basically, you could use something like:

 > grep("\n2:",try(parse(textConnection("ls)")), silent = TRUE))
numeric(0)
 > grep("\n2:",try(parse(textConnection("ls(")), silent = TRUE))
[1] 1

Best,

Philippe Grosjean

..............................................<°}))><........
  ) ) ) ) )
( ( ( ( (    Prof. Philippe Grosjean
  ) ) ) ) )
( ( ( ( (    Numerical Ecology of Aquatic Systems
  ) ) ) ) )   Mons-Hainaut University, Belgium
( ( ( ( (
..............................................................

Jim Lemon wrote:
> Hi gurus,
> 
> After an unsuccessful scrabble through the documentation and Jon's 
> excellent search facility, I am no wiser as to how R recognizes an 
> incomplete command line and politely raises its hand for more. The help 
> page for parse gives no indication that it does anything more than spit 
> the dummy when fed an incomplete command line, but something in there 
> must recognize such ellipsis. Any hints?
> 
> Jim
> 
> ______________________________________________
> 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
> 
>



More information about the R-help mailing list