Which function in R is used to list all variables in the current environment?
a) ls()
b) list()
c) showvars()
d) vars()
Answer:
a) ls()
Explanation:
The ls()
function lists all the variables defined in the current workspace or environment in R.