How to remove all the variable from workspace in R

r

#1

I want to start a new task in R and for this I want to create new variable but after creating the variable I used the ls() command and I am getting all my old the variable but I want to remove all my old variable
c=2
color=red
ls()
[1] “c” “color” “combinedData” “df” “dfr” “dr” “g” “irisr” “m1” “m2”
[11] “my_data” “my_na” “new_model” “new_test” “new_train” “p1” “red” “vect” “vect2” “white”
[21] “x” “y” “z”


#2

@sid100158

you can try this

rm(list=ls())