R: what is the difference between rm and remove?

后端 未结 2 1256
北海茫月
北海茫月 2021-02-19 21:30

What is the difference between rm and remove?

相关标签:
2条回答
  • 2021-02-19 22:01

    They are identical now, but if I remember correctly (and this may have only been in S+) it used to be that rm removed the elements specified without quotes and remove required quotes or a variable with a list of the objects to remove. So rm would be used in the same way that both are mostly used today (without specifying any arguments) and remove would be used like rm( list= ... is today. Since both are useful they were merged into rm a while back, but since people had used remove in the past it was made an alias for rm.

    0 讨论(0)
  • 2021-02-19 22:21

    There is no difference; remove is an alias and is defined as:

    remove <- rm
    

    See the source code here

    0 讨论(0)
提交回复
热议问题