s-news
[Top] [All Lists]

Re: function question

To: 'Weijie Cai' <wjcai2001@hotmail.com>, s-news@lists.biostat.wustl.edu
Subject: Re: function question
From: "Lucke, Joseph F" <LUCKE@uthscsa.edu>
Date: Wed, 23 Oct 2002 08:59:47 -0500

Your forehead will be flat from smacking it with your palm!  See function below.

-----Original Message-----
From: Weijie Cai [mailto:wjcai2001@hotmail.com]
Sent: Tuesday, October 22, 2002 12:58 PM
To: s-news@lists.biostat.wustl.edu
Subject: [S] function question



Hi,everyone,
I want to write a function and I want two outputs to be generated by the
function,
eg. aa<-function(x){
        x1<-x*x
        x2<-log(x)
        list(x1=x1,x2=x2)
        }
now I want to use the form 'aa(3)$x1, aa(3)$x2' to get the ouputs, how to
modify my function?

Thanks.
Weijie



_________________________________________________________________
Get faster connections -- switch to MSN Internet Access!
http://resourcecenter.msn.com/access/plans/default.asp

--------------------------------------------------------------------
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>