calculate <- function(x,y)
{
   a <- x + y    b <- x - y
   list(a=a, b=b)
}

myresult <- calculate(x, y)

myresult$a
myresult$b

Please at least read the "Introduction to R" at
http://www.r-project.org/

It covers all of this very basic material.

Sarah

>




--
Sarah Goslee
http://www.stringpage.com

        [[alternative HTML version deleted]]

______________________________________________
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

Reply via email to