+ 2

In R, what is the difference between = and <-

https://code.sololearn.com/c042GBN95tGO/?ref=app

28th Aug 2021, 9:37 AM
Paul
Paul - avatar
4 Antworten
+ 3
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.
28th Aug 2021, 11:37 AM
Khentit Nadji Sabri
+ 2
👏🏻👏🏻👍🏻😗👌🏻🤠🤠
28th Aug 2021, 5:55 PM
Cmurio
Cmurio - avatar
+ 2
There's yet another assignment operator: <<- Though, I have never used it https://statisticsglobe.com/assignment-operators-in-r
28th Aug 2021, 8:58 PM
Lisa
Lisa - avatar
+ 2
You may also have a look at this thread (similar question): https://www.sololearn.com/Discuss/2749966/?ref=app
29th Aug 2021, 1:46 PM
Lisa
Lisa - avatar