On Tue, Nov 24, 2009 at 1:01 AM, Henrique Dallazuanna wrote:
> Try this:
>
> test[grep("d2", names(test))]
>
Or it can be simply like this:
test[names(test) == "d2"]
> On Mon, Nov 23, 2009 at 2:53 PM, Rajasekaramya
> wrote:
>>
>> Hi There,
>>
>> I have a named List object.I want to access all
Try this:
test[grep("d2", names(test))]
On Mon, Nov 23, 2009 at 2:53 PM, Rajasekaramya wrote:
>
> Hi There,
>
> I have a named List object.I want to access all the list elements that has
> the same name
> for example
> The List
> test <- list()
> $d2
> v1 v2 v3 v4
> 1 2 3 4 5
>
> $d2
> v1 v2 v3
Hi There,
I have a named List object.I want to access all the list elements that has
the same name
for example
The List
test <- list()
$d2
v1 v2 v3 v4
1 2 3 4 5
$d2
v1 v2 v3 v4
1 2 3 4 5
$d3
v1 v2 v3 v4
8 9 19 10
$d1
v1 v2 v3 v4
12 14 15 16
so if i say test[["d2"]] or test["d2"] i should get
3 matches
Mail list logo