Re: [R] finding the minimum value

2009-09-07 Thread Viknesh
Sorry there was a typo in the code. This should work: > tmp <- rep(0, times=1000) > for (i in 1:1000) tmp[i] <- get(paste('B', i, sep=''")) > mean(tmp) Viknesh wrote: > > Hi, > > If I correctly understand what you want to do, then this might work: > >> tmp <- rep(0, times=1000) >> for (i in

Re: [R] finding the minimum value

2009-09-07 Thread Viknesh
Hi, If I correctly understand what you want to do, then this might work: > tmp <- rep(0, times=1000) > for (i in 1:1000) tmp[i] <- get(paste('B', i, sep='')) > mean(tmp) HTH, Vik maram salem wrote: > > Hi all, > I'm using a certain  procedure to calculate the value of some > variable(Bayes r

Re: [R] finding the minimum value

2009-09-07 Thread Charles C. Berry
On Mon, 7 Sep 2009, maram salem wrote: Hi all, I'm using a certain? procedure to calculate the value of some variable(Bayes risk),B. So I got the values B1, B2, , B1000, each under certain input values and using a long procedure. Now, I want to put the values I got in a nummerical vect

[R] finding the minimum value

2009-09-07 Thread maram salem
Hi all, I'm using a certain  procedure to calculate the value of some variable(Bayes risk),B. So I got the values B1, B2, , B1000, each under certain input values and using a long procedure. Now, I want to put the values I got in a nummerical vector and find their minimum value. I think