[R] Creating a list of empty lists

Magnus Torfason zulutime.net at gmail.com
Tue Oct 13 16:03:52 CEST 2009


Live and learn ...

Thank you!

On 10/13/2009 9:57 AM, Romain Francois wrote:
> On 10/13/2009 03:48 PM, Magnus Torfason wrote:
>> l = list(list())
>>      for ( i in sequence(length-1) )
>>      {
>>          l = list(unlist(l,recursive=FALSE), list())
>>      }
> 
> About this :
> 
>  > rep( list(list()), 3 )
> [[1]]
> list()
> 
> [[2]]
> list()
> 
> [[3]]
> list()
> 
> Romain
>




More information about the R-help mailing list