Re: [R] loops in R

2014-11-05 Thread Berend Hasselman
On 05-11-2014, at 14:41, Noha Osman wrote: > Hi Folks > > Iam a new user of R and I have a question . Hopefully anyone help me in that > issue > > > I have that dataset as following > > Sample Population Species Tissue R GB > 1 Bari1_062-1 Bari1 ret

Re: [R] loops in R

2014-11-05 Thread Steve Lianoglou
While you should definitely read the tutorial that Don is referring to, I'd recommend you take a different approach and use more R idiomatic code here. In base R, this could be addressed with few approaches. Look for help on the following functions: * tapply * by * aggregate I'd rather rec

Re: [R] loops in R

2014-11-05 Thread Daniel Nordlund
On 11/5/2014 5:41 AM, Noha Osman wrote: Hi Folks Iam a new user of R and I have a question . Hopefully anyone help me in that issue I have that dataset as following Sample Population Species Tissue R GB 1 Bari1_062-1 Bari1 ret seed 94.52303 80.7

Re: [R] loops in R

2014-11-05 Thread Don McKenzie
Have you read the tutorial that comes with the R distribution? This is a very basic database calculation that you will encounter (or some slight variation of it) over and over. The solution is a few lines of code, and someone may write it out for you, but if no one does You have 20 population