[Rd] The parsing of '{' and a function that equal to '{'

thmsfuller066 at gmail.com thmsfuller066 at gmail.com
Fri May 14 21:38:59 CEST 2010


Hello All,

I tried the sample code from the help. Although '{' is assigned to
'do', the call syntaxes for 'do' and '{' are not the same ('do' has
','s, but '{' has line breaks). I guess there is a difference in
parsing the code block of 'do' and the code block of '{'. Could you
please let me know some internal details so that I can understand the
differences?

> do=get("{")
> do(x <- 3, y <- 2*x-3, 6-x-y)
[1] 0
> {
+   x <- 3
+   y <- 2*x-3
+   6-x-y
+ }
[1] 0
> x
[1] 3
> y
[1] 3
>

-- 
Tom



More information about the R-devel mailing list