On Thu, Apr 26, 2012 at 02:49:08PM -0500, cassie jones wrote:
> Thanks Berend, you are right. The break command would not work here. But
> the while loop is taking time to generate the desired.
>
> On Thu, Apr 26, 2012 at 2:39 PM, Berend Hasselman wrote:
[...]
> > You need a while loop for this.
On Thu, Apr 26, 2012 at 02:30:09PM -0500, cassie jones wrote:
> Hello R-users,
>
> I am having a problem with the 'break' command in R. I am wondering if
> anyone can help me out with this. My program is similar to the following.
>
> a=rep(NA,5)
> a[1]=0
> for(i in 2:5)
> {
> a[i]=a[i-1]+runi
Thanks Berend, you are right. The break command would not work here. But
the while loop is taking time to generate the desired.
On Thu, Apr 26, 2012 at 2:39 PM, Berend Hasselman wrote:
>
> On 26-04-2012, at 21:30, cassie jones wrote:
>
> > Hello R-users,
> >
> > I am having a problem with the 'b
On 26-04-2012, at 21:30, cassie jones wrote:
> Hello R-users,
>
> I am having a problem with the 'break' command in R. I am wondering if
> anyone can help me out with this. My program is similar to the following.
>
> a=rep(NA,5)
> a[1]=0
> for(i in 2:5)
> {
>a[i]=a[i-1]+runif(1,0,3)
>if
4 matches
Mail list logo