I\'m trying to clear my R workspace. Nothing I\'ve found in any thread seems to work - and I\'ve been googling and trying solutions for hours now :(
When I open R an
What you are seeing is the source code for the ls
function. When you enter a function name without the parentheses, you'll see the complete source code for that function (provided that function is in one of the packages attached to the search path, or in the global environment).
When you see character(0)
as the result of calling ls()
, that means that there are no objects in the global environment. The base package, where ls
calls home, is different from the global environment, and objects there cannot be removed.
When character(0)
is the result of ls()
after you call rm(list=ls())
, you have successfully cleared the objects in the global environment.