Skip to content
Prev 303775 / 398502 Next

Some kind of inverse of "names"

Hi Sergio,
'names' are just an attribute of your list.
If all elements of your list are of the same type (i.e. integer in your 
example) you may try something like 'unlist (li)' or even 
'as.numeric(unlist(li))'.
This will give you the values you wanted.
An other approach is organizig your data not as a list but as a named 
vector by simply using concatenate:

li <- c(a=1, b=2, c=3, d=4)

This will create a named integer vector (at least I think so) and you 
will receive the data by calling 'li'.
Hope this helped you a little.
Peter

Am 21.08.2012 00:19, schrieb Julio Sergio Santana: