Re: [R] get: problem with environments

2012-10-12 Thread Martin Ivanov
heless the code is finally stable and it is thanks to Your suggestion. Best regards, Martin Ivanov > Оригинално писмо >От: Thomas Lumley >Относно: Re: [R] get: problem with environments >До: R. Michael Weylandt >Изпратено на: Четвъртък, 2012, Октомври 11

Re: [R] get: problem with environments

2012-10-10 Thread Thomas Lumley
On Thu, Oct 11, 2012 at 11:18 AM, R. Michael Weylandt wrote: > Thanks Prof Lumley, > > I'm still not sure how this gets to the call stack of 5 or 6 the OP > reported or the difference between GUI & Terminal. Any thoughts there? I don't see how the terminal version is getting 5 and 6 rather than

Re: [R] get: problem with environments

2012-10-10 Thread R. Michael Weylandt
On Wed, Oct 10, 2012 at 10:04 PM, Thomas Lumley wrote: > On Thu, Oct 11, 2012 at 9:05 AM, R. Michael Weylandt > wrote: >> Can someone more capable than I help Martin out with this? I'm feeling >> out of my league (that or I've missed something obvious) >> >> Shot in the dark: you aren't running t

Re: [R] get: problem with environments

2012-10-10 Thread Thomas Lumley
On Thu, Oct 11, 2012 at 9:05 AM, R. Michael Weylandt wrote: > Can someone more capable than I help Martin out with this? I'm feeling > out of my league (that or I've missed something obvious) > > Shot in the dark: you aren't running this in some sort of debug mode, are you? > > RMW > > On Sun, Oct

Re: [R] get: problem with environments

2012-10-10 Thread R. Michael Weylandt
Can someone more capable than I help Martin out with this? I'm feeling out of my league (that or I've missed something obvious) Shot in the dark: you aren't running this in some sort of debug mode, are you? RMW On Sun, Oct 7, 2012 at 5:10 PM, Martin Ivanov wrote: > Thank You very much for Your

Re: [R] get: problem with environments

2012-10-07 Thread Martin Ivanov
Thank You very much for Your replies. Dear Michael, "Does this persist after a new session (perhaps running as R --vanilla) and/or reinstall?" Yes, it does. After running R --vanilla, still there are 4 contexts more on the call stack. "You didn't show us how you tried to use parent.frame()" I

Re: [R] get: problem with environments

2012-10-07 Thread R. Michael Weylandt
ich = x) : not that many frames on the stack > print(testfun(x=6)) > #Error in sys.frame(which = x) : not that many frames on the stack > From: R. Michael Weylandt > To: Martin Ivanov > Cc: r-help@r-project.org > Sent: Sunday, October 7, 2012 5:34 AM > Subject: Re: [R] get:

Re: [R] get: problem with environments

2012-10-07 Thread arun
- From: R. Michael Weylandt To: Martin Ivanov Cc: r-help@r-project.org Sent: Sunday, October 7, 2012 5:34 AM Subject: Re: [R] get: problem with environments On Sun, Oct 7, 2012 at 10:16 AM, Martin Ivanov wrote: >  Dear R users, > > I am running R-2.15.1 in Linux Slackware64-14.0. H

Re: [R] get: problem with environments

2012-10-07 Thread Rui Barradas
Hello, No, I can't confirm the behavior the op sees. I've tried it in an R terminal on ubuntu 12.04, rkward on ubuntu, and RGui on Windows 7. R version 2.15.1. Here's the rkward sessionInfo. sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CT

Re: [R] get: problem with environments

2012-10-07 Thread R. Michael Weylandt
On Sun, Oct 7, 2012 at 10:16 AM, Martin Ivanov wrote: > Dear R users, > > I am running R-2.15.1 in Linux Slackware64-14.0. Here is my minimal working > example: > > testfun <- function (x) { > a <- 0; > sapply(X="a", FUN=get, envir=sys.frame(which=x)); > } > > Inside R, that is R called from w

[R] get: problem with environments

2012-10-07 Thread Martin Ivanov
Dear R users, I am running R-2.15.1 in Linux Slackware64-14.0. Here is my minimal working example: testfun <- function (x) { a <- 0; sapply(X="a", FUN=get, envir=sys.frame(which=x)); } Inside R, that is R called from within a Linux terminal, the following code works: testfun(x=5) print(test