R: += (plus equals) and ++ (plus plus) equivalent from c++/c#/java, etc.?

前端 未结 9 663
攒了一身酷
攒了一身酷 2020-11-29 00:40

Does R have a concept of += (plus equals) or ++ (plus plus) as c++/c#/others do?

9条回答
  •  有刺的猬
    2020-11-29 01:21

    R doesn't have these operations because (most) objects in R are immutable. They do not change. Typically, when it looks like you're modifying an object, you're actually modifying a copy.

提交回复
热议问题