5 ms·
The difference between assigning variables via "=" versus "<-" is not mentioned. That would be confusing to someone learning R.
by scottmcdot 5y ago
The difference between assigning variables via "=" versus "<-" is not mentioned. That would be confusing to someone learning R.
- deleted 5y ago[deleted]
- countrymile 5y ago
- kkoncevicius 5y agoIn practice the difference is almost non-existent, unless you start doing assignments within function calls, which is a popular style among some R stars, like Martin Machler [1]. But on the other hand some of them resolve to just always use "=" everywhere, including one of R's creators - Ross Ihaka [2]. Anyhow, explaining the difference at that part of the tutorial is not easy, so I chose to omit it for now. But might introduce it later, along with "<<-" and "->>", probably after describing closures. [1]: https://github.com/cran/diptest/blob/master/R/dipTest.R#L37 https://github.com/cran/diptest/blob/master/R/dipTest.R#L37 [2]: https://www.youtube.com/watch?v=88TftllIjaY&t=2101s https://www.youtube.com/watch?v=88TftllIjaY&t=2101s