Re: [R] Function try and Results of a program

2010-09-05 Thread Evgenia
David, your example clarify me the use of sink. I really appreciate your help Evgenia -- View this message in context: http://r.789695.n4.nabble.com/Function-try-and-Results-of-a-program-tp2526621p2527227.html Sent from the R help mailing list archive at Nabble.com.

[R] Function try and Results of a program

2010-09-04 Thread Evgenia
Hello, users. Dear users, ***I have a function f to simulate data from a model (example below used only to show my problems) f-function(n,mean1){ a-matrix(rnorm(n, mean1 , sd = 1),ncol=5) b-matrix(runif(n),ncol=5) data-rbind(a,b) out-data out} *I want to simulate 1000 datasets

Re: [R] Function try and Results of a program

2010-09-04 Thread David Winsemius
On Sep 4, 2010, at 6:10 AM, Evgenia wrote: Hello, users. Dear users, ***I have a function f to simulate data from a model (example below used only to show my problems) f-function(n,mean1){ a-matrix(rnorm(n, mean1 , sd = 1),ncol=5) b-matrix(runif(n),ncol=5) data-rbind(a,b) out-data

Re: [R] Function try and Results of a program

2010-09-04 Thread Evgenia
David, your suggestion about try works perfect for me. I still have a problem with sink. Could you explain me better your suggestion? Thanks alot Evgenia -- View this message in context: http://r.789695.n4.nabble.com/Function-try-and-Results-of-a-program-tp2526621p2526822.html Sent from

Re: [R] Function try and Results of a program

2010-09-04 Thread David Winsemius
On Sep 4, 2010, at 12:41 PM, Evgenia wrote: David, your suggestion about try works perfect for me. I still have a problem with sink. Could you explain me better your suggestion? When you sink to a file, you will continue sending console output to that file until you issue sink(). And