s-news
[Top] [All Lists]

Re: frames (?) question

To: <ripley@stats.ox.ac.uk>
Subject: Re: frames (?) question
From: Leonid Gibiansky <lgibiansky@emmes.com>
Date: Mon, 18 Nov 2002 14:40:51 -0500
Cc: <s-news@lists.biostat.wustl.edu>
In-reply-to: <Pine.LNX.4.31.0211181902170.25591-100000@gannet.stats>
References: <3.0.5.32.20021118140122.0091a970@host2a.emmes.com>
Dr. Ripley,
Thanks for your help.

I am sorry, I was not clear:
This is S function that I start from the S+ command window. 
find("runno") returned reference to the _Data directory.

As to the program, this is large and complicated program that is very
helpful, and I do not think that it is necessary to know every detail of
the program to be able to use it. 

Still, it looks like an S+ bug as well, since S+ refused to accept an
assignment and even did not give an error or warning message (the warning
came only on or after exit from xpose3)

Thanks again,
Leonid




At 07:06 PM 11/18/02 +0000, ripley@stats.ox.ac.uk wrote:
>On Mon, 18 Nov 2002, Leonid Gibiansky wrote:
>
>> I found some strange behavior of  S+ 2000 Release 1 Professional and I
>> would be grateful for the explanation:
>>
>> I have a command-line interactive program (xpose3 for those who is familiar
>> with the program) that uses a variable runno.
>
>Is this an S function, or really a command-line program?  (Sounds more
>like the first.)
>
>> I also happen to use the same
>> name in my script that I am using from the script window. Then attempts to
>> change runno from the script window do not give any warning and do not
>> change runno (but lead to hidden errors in my script that uses the data
>> associated with the incorrect runno):
>>
>> > runno <- 102
>> > runno
>> [1] "101"
>>
>>
>> When I exited xpose3, I got a message on exit:
>>
>> Warning messages:
>>   "runno" assigned on database 1 but hidden by an object of the same name
>> on database 0
>>
>> Now when I am trying to change runno I am getting:
>>
>> > runno <- 102
>> > runno
>> [1] "101"
>> Warning messages:
>>   "runno" assigned on database 1 but hidden by an object of the same name
>> on database 0
>>
>> When I open runno via Object Explorer, I see "102" there.
>>
>> It looks like S+ is writing runno into one place, but reading it from
>> another one. Is it expected behavior or a bug ? Is it possible to change
it ?
>
>It's a bug, but not in S.  Something you have used has done
>assign("runno", 101, w=0) or the equivalent.  Now, people should not mess
>with the session database (w=0) without documenting it, but equally it is
>inadvisable to run S code you don't understand.
>
>Try find("runno").
>
>-- 
>Brian D. Ripley,                  ripley@stats.ox.ac.uk
>Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>University of Oxford,             Tel:  +44 1865 272861 (self)
>1 South Parks Road,                     +44 1865 272860 (secr)
>Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>
>--------------------------------------------------------------------
>This message was distributed by s-news@lists.biostat.wustl.edu.  To
>unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
>the BODY of the message:  unsubscribe s-news
>

<Prev in Thread] Current Thread [Next in Thread>