Reputation: 1575
Usually, in R, when we debug, we set options(error=recover)
, and run our functions. If it generates any errors, we enter 1
to go the top level. If we type ls()
, it displays a list of variables at the local level of the functions. Is there is a quick way to print the current values of all these variables?
Upvotes: 2
Views: 536
Reputation: 132706
This is not related to debugging. You are asking how to print the values of all objects in an environment. You need to "get" multiple variables and that can be done with the mget
function: mget(ls())
.
Upvotes: 2