Monday 25 April 2016

The Differences Between "<-" and "="

Cited from Difference between assignment operators in R

To reduce ambiguity, we should use either <- or = as assignment operator, and only use = as named-parameter specifier for functions.

In conclusion, for better readability of R code, I suggest that we only use <- for assignment and = for specifying named parameters.

No comments:

Post a Comment