Re: [R] Create a function with multiple object as an output

2011-11-15 Thread Ben Bolker
PRI gmail.com> writes: > > Write an R program to draw 10,000 random samples using the Polya Urn Scheme > where the initial contents of the urn is one white ball and one black ball. > Accumulate the proportion of white balls after each draw into one vector. > Upload your R script file. > HINT: Yo

Re: [R] Create a function with multiple object as an output

2011-11-15 Thread Rolf Turner
On 16/11/11 10:10, anaraster wrote: I've seen some questions regarding the output of multiple objects from a function, however the suggestions all end up suggesting the use of return(list(result1=result1, result2=result2 , result3=result3)). How can I return multiple objects that are 2 big to b

Re: [R] Create a function with multiple object as an output

2011-11-15 Thread Sarah Goslee
Hi, On Tue, Nov 15, 2011 at 4:10 PM, anaraster wrote: > I've seen some questions regarding the output of multiple objects from a > function, however the suggestions  all end up suggesting the use of > return(list(result1=result1, result2=result2 , result3=result3)). > > How can I return multiple

Re: [R] Create a function with multiple object as an output

2011-11-15 Thread PRI
Write an R program to draw 10,000 random samples using the Polya Urn Scheme where the initial contents of the urn is one white ball and one black ball. Accumulate the proportion of white balls after each draw into one vector. Upload your R script file. HINT: You can simulate sampling one ball from

Re: [R] Create a function with multiple object as an output

2010-02-10 Thread Jim Holtman
you can return a single object, so a list is what you want. you can always break it apart after the return. What is the problem you are trying to solve? Sent from my iPhone. On Feb 10, 2010, at 8:31, Arnaud Mosnier wrote: Dear useRs, I want to make a function that return several object (f