No measurable performance difference; more about readability and convention. It's all the computations that R is doing that will make or break you.
Use <-
; "R In Action" says on page 7 that it's standard and other R developers will make fun of you if you don't.
There might be a deeper reason in the R documentation:
There are three different assignment operators: two of them have
leftwards and rightwards forms.
The operators <- and = assign into the environment in which they are
evaluated.
The operator <- can be used anywhere, whereas the operator = is only
allowed at the top level (e.g., in the complete expression typed at
the command prompt) or as one of the subexpressions in a braced list
of expressions.
It's usually a good idea to use the proper idiom of the language you're writing in.
No comments:
Post a Comment