On 03/12/2010 05:13 PM, Zhongyi Yuan wrote:
Dear R users:
I am hoping that someone can help with constructing a list that consists of
list with the number of lists variable.
i.e. to find a convenient express(or loop sentences) to realize the
following:
list( list(para1=p1, para2=p2),
Hi Jim,
Dennis Murphy solved my problem by the following code.
Thank you for you suggestion. Will check out listBuilder function too.
best,
Zhongyi
# (2) A little more general: prespecify the number of list components
# and run a one-line loop to populate the list
l - vector('list', 6)
You can do this also, using replicate:
replicate(6, list(para1 = 1:5, para2 = 5:9), simplify = FALSE)
On Fri, Mar 12, 2010 at 2:51 PM, Zhongyi Yuan zhongyi-y...@uiowa.edu wrote:
Hi Jim,
Dennis Murphy solved my problem by the following code.
Thank you for you suggestion. Will check out
Hi Henrique,
Great.
I tried a similar thing but used
list( replicate(6, list(para1 = 1:5, para2 = 5:9), simplify = FALSE) )
and didn't work. Seems I don't need list(...).
Thanks.
Zhongyi
On Fri, Mar 12, 2010 at 11:56 AM, Henrique Dallazuanna www...@gmail.comwrote:
You can do this also, using
Dear R users:
I am hoping that someone can help with constructing a list that consists of
list with the number of lists variable.
i.e. to find a convenient express(or loop sentences) to realize the
following:
list( list(para1=p1, para2=p2), list(para1=p1, para2=p2), ,
list(para1=p1,para2=p2)
5 matches
Mail list logo