Skip to content
Prev 245653 / 398506 Next

python-like dictionary for R

Paul -
    You can also use named vectors as something similar to
a python dictionary:
one
  20
four
   50

Although the result is named, it can be used as a regular R
value:
three
    60

If the names annoy you (as they seem to annoy many R users),
you can unname the object:
[1] 60

 					- Phil Spector
 					 Statistical Computing Facility
 					 Department of Statistics
 					 UC Berkeley
 					 spector at stat.berkeley.edu
On Wed, 22 Dec 2010, Paul Rigor wrote: