[R] R: to view the memory

R Help rhelp.stats at gmail.com
Wed Sep 12 14:28:10 CEST 2007


the function ls() will list all the variables currently in the memory.
 To get their values, you'll also need to use the parse and eval
functions.  Try the following:

x = ls()
for(i in 1:length(x)){
    print(x[i])
    print(eval(parse(text=x[i])))
}

It's a little crude, but it will do the job.

Sam
On 9/11/07, Sumit.Gupta at ubs.com <Sumit.Gupta at ubs.com> wrote:
> Hello,
>
> I am wondering if it is possible to view what variables and vairable
> values are stored in the R memory. This to enable debugging of R-scripts
> I write.
>
> Sumit
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list