As an R user, I'm used to the typical "<-" operator. However, I recently encountered operator "<<-". (It's from other people's code, therefore I cannot freely copy-paste it herein.) It appears they are equivalent, but I wonder if there is any difference between the two.
Asked
Active
Viewed 36 times
0
-
2<<- assigns a variable in the global environment, to be used anywhere – user2974951 Dec 12 '18 at 08:40
-
2@user2974951 and with extreme caution ;-) – Wimpel Dec 12 '18 at 08:44
-
@user2974951 It assigns only to the global environment if the variable is not found in a previous enclosing environment. – Roland Dec 12 '18 at 08:58
-
@Leevo Either these other people are quite advanced R programmers or they don't know what they are doing. – Roland Dec 12 '18 at 09:00