Re: [R] R newbie...

From: paul sorenson <sourceforge_at_metrak.com>
Date: Wed 07 Dec 2005 - 05:48:49 EST

Return something that can hold more than one value, eg:

calculate <- function(x, y) {

        list(a=x+y, b=x-y)
}

David Hajage wrote:
> Thank you for your answer.
>
> And what if my first function gives 2 results :
>
> calculate <- function(x,y)
> {
> a <- x + y
> b <- x - y
> }
>
> How can I use both a and b in a new function ?



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Dec 07 06:47:01 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:30 EST