Check out example codes for "remove all objects in R". It will help you in understanding the concepts better.

Code Example 1

rm(list = ls(all.names = TRUE))

Code Example 2

#in R
rm(list=ls())

Learn ReactJs, React Native from akashmittal.com