I want to be able to retrieve the local variables from R from a called function. Can I do this? (Like building a debugger.) Example:
show_locals <- function()
# put something in here that shows local_1 and its value
local_1 = 123
show_locals() # inspect local variables with custom formatting
Note: I will eventually require show_locals
to be in a different library.
Edit: I would like to also see the value of local_1
.
(This is similar to my questions for the same in Ruby or Python.)