Basic Methods for Handling Variables
Explore how to manage variables in R by learning to list all variables using the ls() function and delete unwanted variables with the rm() function. This lesson helps you handle your R workspace efficiently by understanding basic commands for variable management.
We'll cover the following...
We'll cover the following...
Listing and Deleting Variables
Listing
We can check all the variables that have been created in the workspace using the keyword ls().
To import recent packages for execution of codes on our platform, we have declared a variable r at our backend. Under normal circumstances, you will not get this variable when using the ls() command.
Deleting
We can delete a specific variable from the workspace.
The keyword rm() can help us permanently remove one or more objects from the workspace: