Skip to content
Back to formatted view

Raw Message

Message-ID: <loom.20111110T194723-950@post.gmane.org>
Date: 2011-11-10T18:55:44Z
From: JulioSergio
Subject: Named components in a list

I'm studying lists and I came to an example where 

> L
$name
[1] "Fred"

$wife
[1] "Mary"

$no.children
[1] 4

$child.ages
[1] 4 7 9

then following the instructions to extend the list with a new component, I 
executed:

> L[5] <-list(NewName="something")

and the new list I got was:

> L
$name
[1] "Fred"

$wife
[1] "Mary"

$no.children
[1] 4

$child.ages
[1] 4 7 9

[[5]]
[1] "something"

Here the 5th element lacks the name "NewName" ... maybe this is a bug. Do you 
have any comments?

Thanks,

Sergio.