4 ms·
Rightward assignment is pretty strongly discouraged in the R community, due to the effect it has of burying the lede. That said, I always felt the same about Ru
by jcheng 6y ago
Rightward assignment is pretty strongly discouraged in the R community, due to the effect it has of burying the lede. That said, I always felt the same about Ruby’s inline if/unless (`puts "still working" unless done`) so maybe it will have a better reception in this community.
- toxik 6y agoInteresting, that it became discouraged. Probably won’t make it into Ruby proper then. I don’t fault them for experiment.
- jcheng 6y agoActually, this is a pretty good reason, and it's straight from the source (creator of S, the predecessor of R): https://stackoverflow.com/a/51548423/139922 https://stackoverflow.com/a/51548423/139922 > When you type a long expression only to remember at the end that it would be a good idea to save the result, a right-hand arrow allows you to perform an assignment without retyping the line. (I don't do this personally, though. I just run the expression and then my next command is `x <- .Last.value`)
- thebelal 6y agoI use right assignment in this way all the time, you should try it Joe :)