[R] loop variable passage and lists

2004-01-24 Thread Patrick Giraudoux
I cannot understand why the following expression is accepted (and gives the expected result: to set column 3 and 4 of the first element of list1 -a data.frame list- as first element of list2): list2[[1]]-list1[[1]][3:4] ...while this one is not (to do the same iteratively from the first to the

Re: [R] loop variable passage and lists

2004-01-24 Thread Prof Brian Ripley
On Sat, 24 Jan 2004, Patrick Giraudoux wrote: I cannot understand why the following expression is accepted (and gives the expected result: to set column 3 and 4 of the first element of list1 -a data.frame list- as first element of list2): list2[[1]]-list1[[1]][3:4] ...while this one is