s-news
[Top] [All Lists]

Re: How to repeat a function thousands of tims

To: <s-news@lists.biostat.wustl.edu>
Subject: Re: How to repeat a function thousands of tims
From: chushugu@hotmail.com
Date: Sun, 28 Sep 2003 12:57:21 -0700
Wrom: HMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXC
Hi all
 
Here is what I am planning to do :
 
opo <- function(pop,agelimit) {
    qc <- qcompare(agelimit)
    death <- rep(0,110)
   
    # Here I want to repeat unit function 1000 times, but don't want to use loop if there is an alternative way
 
 
    unit <- function(agelimit,qc){
        ....
        tem <- ...
        death <- death+ temp
    }
 
}
 
The idea is I want to update "death" 1000 times using inner function "unit". And I wonder if there is a way not to use loop.
 
Thanks for any idea
<Prev in Thread] Current Thread [Next in Thread>
  • Re: How to repeat a function thousands of tims, chushugu <=