| To: | s-news@lists.biostat.wustl.edu, r-help@stat.math.ethz.ch |
|---|---|
| Subject: | lapply? |
| From: | eugene dalt <eugenedalt@yahoo.com> |
| Date: | Sat, 19 Aug 2006 07:01:39 -0700 (PDT) |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=NHlakHI7AKwtttsOHk+4nl4p5jcda1mfp3DT8yAEawyWDk7apbapwfMRMO+58ilh3VfnJAZvp5oab3rjfhALV2ZgpIFsGd+NoawroPERnuf+qFMb9lrDAj+cRnjaL2G6a7sO8ghZLwG/fahnWro0V3fgvx+kGu14OVLFL2X2NxQ= ; |
| In-reply-to: | <7.0.1.0.2.20060818134236.033499d8@earthlink.net> |
Hi folks,
I would like to know if the following loop can be
rewritten with lapply
list1 <- as.list(0)
testv <- c(4,6,7,8)
for( i in 1:4){
list1[[i]] <- rep(5,testv[i])
}
Thanks in Advance. - Eugene
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Origin for dates, David Huffer |
|---|---|
| Next by Date: | Re: lapply?, Daniel_J_Celta |
| Previous by Thread: | reversing a scale, Walter R. Paczkowski |
| Next by Thread: | Origin for dates, David Huffer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |