Dictionary data structure in R

Viewed 13366

In R, I have, for example:

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

If I type foo, I 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).

2 Answers
Related