Re: [R] what does this syntax mean in R

2017-04-16 Thread Duncan Murdoch
On 16/04/2017 2:03 PM, Ramnik Bansal wrote: ​I am not able to understand the output of the following lines of code. *if(TRUE)(print("A"))​* Versus *if(TRUE){print("A"))* I assume you have a typo here (or maybe your posting in HTML has done more damage than usual. This line should be if(T

[R] what does this syntax mean in R

2017-04-16 Thread Ramnik Bansal
​I am not able to understand the output of the following lines of code. *if(TRUE)(print("A"))​* Versus *if(TRUE){print("A"))* *In first case I get the ooutput as * *>[1] "A"* *>[1] "A"* *Why does the first case print "A" twice * *Why does it not happen with the statement **if(TRUE){print("A