serina
serina

Reputation: 171

What is this statement doing in R code?

I know nothing about R, when I read a R code, in the very first line, there appears

rm(list=ls())

What does it mean? Thanks

Upvotes: 3

Views: 389

Answers (1)

Arnkrishn
Arnkrishn

Reputation: 30452

ls() in R lists the active variables and rm(list=ls()) will remove all the active variables.

Upvotes: 4

Related Questions