On 10/13/2009 10:06 AM, Henrique Dallazuanna wrote:
Try this:
replicate(3, list())
Thanks!
I now have three ways to achieve my goal:
1: rep(list(list()), 3)
2: replicate(3, list())
3: Due to the way R recycles arguments, I found that it is enough to
have construct a list(list()), and then
Try this:
replicate(3, list())
On Tue, Oct 13, 2009 at 10:48 AM, Magnus Torfason
wrote:
> Well here is one more brain-teaser related to assigning stuff into a list of
> list. What if I need to create a new list of empty lists? I have actually
> got a solution to this problem:
>
> l = list(lis
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]]
li
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
--
Romain Francois
Professional R Enth
Well here is one more brain-teaser related to assigning stuff into a
list of list. What if I need to create a new list of empty lists? I have
actually got a solution to this problem:
l = list(list())
for ( i in sequence(length-1) )
{
l = list(unlist(l,recursive=FALSE), list(
5 matches
Mail list logo