rm(list=ls())


Usage

This function clears the workspace so that you can start fresh. It should go at the top of every new script, and only at the top.

Usage:

rm(list=ls())
  • The output is not stored anywhere as the only purpose of this command is to clear the workspace.
  • You don’t need to worry more about the syntax of this command. Just copy and paste it at the start of every script.

Example

rm(list=ls())