s-news
[Top] [All Lists]

Re: [splus-users,14046] [S] gam(lo()) and predict.gam()

To: Takezawa Kunio <takezawa@affrc.go.jp>, s-news@wubios.wustl.edu
Subject: Re: [splus-users,14046] [S] gam(lo()) and predict.gam()
From: Bill Venables <Bill.Venables@cmis.csiro.au>
Date: Mon, 29 May 2000 21:54:08 +1000
Sender: owner-s-news@wubios.wustl.edu
At 08:13 PM 5/29/00 +0900, Takezawa Kunio wrote:
>
>Hi! S-plus users.
>E-mail: s-news@wubios.wustl.edu
>
>   Let me modify the program I wrote in my previous
>article. The two programs below work well.
>I have heard that "<<-" and "rm())" are preferable
>to "attach()" and "detach()". But I do not know
>why.

You were very poorly advised, not that the two are 
alternatives.

If you are writing functions for other people to use
then using "<<-" is positively dangerous and your software
might fairly be called a virus.  You run the risk, however
small, of destroying genuine data.  You simply should not
do it.  Exactly the same applies to rm() from within a 
function.

If you are writing functions solely for yourself to you,
then you have to take the responsibility for what you do,
but surprisingly many functions written originally for one
person to use find their way into public use.

Rather like a virus, in fact.

If you must put something into the global search path from
within a function, (and you rarely do) then consider assigning
to frame 1.  You can still do damage there but you usually
shoot yourself in the foot, not your hapless and indignant user.

Bill Venables.
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

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