views:

86

answers:

1

In R, for example

> foo <- list(a=1,b=2,c=3)

if I type foo, get

$a
[1] 1

$b
[1] 2

$c
[1] 3

How can I look through foo to get a list of 'keys' only, in this case, (a, b, c)? Thanks all

+8  A: 
> names(foo)
[1] "a" "b" "c"
Joshua Ulrich