Skip to content
Prev 82298 / 398513 Next

R is GNU S, not C.... [was "how to get or store ....."]

Xiaofan Li wrote:
The problem with doing this is that it can be misleading.  For example, 
you might think the following code does something different than what it 
does:

   x <-  1
       + 2 ;

which gives a result that might surprise you:

 >   x <-  1
 >       + 2 ;
[1] 2
 > x
[1] 1

You can argue that R's rules for marking the end of statements are 
rather bizarre and they should be different, but they aren't, and you 
shouldn't use a style of coding that suggests that they are.

Duncan Murdoch