[R] Re : Elegant Code

2012-03-16 Thread Pascal Oettli
Hi Raphael, Something like that? require(pscl)sim - numeric() for(i in 1:5){   eval(parse(text=paste('b',i,' - rigamma(50,1,1)',sep='')))   eval(parse(text=paste('theta',i,' - rgamma(50,0.5,(1/b',i,'))',sep='')))   eval(parse(text=paste('sim',i,' - rpois(50,theta',1,')',sep='')))  

Re: [R] Re : Elegant Code

2012-03-16 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Pascal Oettli Sent: Friday, March 16, 2012 12:36 AM To: Raphael Fraser Cc: r-help@r-project.org Subject: [R] Re : Elegant Code Hi Raphael, Something like that? require

Re: [R] Re : Elegant Code

2012-03-16 Thread Raphael Fraser
, 2012 12:36 AM To: Raphael Fraser Cc: r-help@r-project.org Subject: [R] Re : Elegant Code Hi Raphael, Something like that? require(pscl)sim - numeric() for(i in 1:5){   eval(parse(text=paste('b',i,' - rigamma(50,1,1)',sep='')))   eval(parse(text=paste('theta',i,' - rgamma(50,0.5,(1/b',i

Re: [R] Re : Elegant Code

2012-03-16 Thread Ranjan Maitra
Nordlund djnordl...@frontier.com wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Pascal Oettli Sent: Friday, March 16, 2012 12:36 AM To: Raphael Fraser Cc: r-help@r-project.org Subject: [R] Re : Elegant Code

Re: [R] Re : Elegant Code

2012-03-16 Thread Raphael Fraser
[mailto:r-help-boun...@r-project.org] On Behalf Of Pascal Oettli Sent: Friday, March 16, 2012 12:36 AM To: Raphael Fraser Cc: r-help@r-project.org Subject: [R] Re : Elegant Code Hi Raphael, Something like that? require(pscl)sim - numeric() for(i in 1:5){   eval(parse(text