May I know what does this line mean in R?

My Code:

rm(list = ls())


Hello! Could someone explain to me the purpose of this line of code in R? Not sure how to use it.

1 Like

Hello @lauratangwt.

  • rm or remove function is used for removing objects in R.
  • ls function gives the name of objects in the envrionment.
  • rm(list=ls()) will delete all objects in the workspace.
1 Like