A recent thread on the r-help mailing list raises a common question for beginning R users: should you use = (equals) or <- (back arrow) for assignments? In R, both of the following statements have the effect of assigning the value 3 to the variable x:
x = 3
x <- 3
So if they have the same effect, does it matter which you use?
x = 3
clearly means "assign 3 to x", whereas
f(x = 3)
clearly means "call function f, setting the argument x to 3".
f(x <- 3)
which means "assign 3 to x, and call f with the first argument set to the value 3". This is a contrived example though, and never really occurs in real-world programming. [UPDATE: In fact, constructs like this are best avoided for reasons given in the comments below.]