Message-ID: <48DD066B.21927.E420D@fritsch.bips.uni-bremen.de>
Date: 2008-09-26T13:57:31Z
From: Stefan Fritsch
Subject: Return a list
Dear R Users,
another problem for me is the output of a function.
I have several output variables which I give back with the list command.
test <- function {return(list(a,b,c,d,e,f,g,...))}
After the usage of the function I want to assign the variables to the output variables.
result <- test()
a <- result$a
b <- result$b
c <- result$c
d <- result$d
...
is there a more elegant way to assign these variables, without writing them all down?
thank you very much for your help!
Stefan Fritsch