Dear R developers,
A great R feature is that elements of vectors, lists and dataframes can
have names:
vx = c(a=1, b=2)
lx = list(a=1, b=2)
Accessing element a of vx: vx['a']
Accessing element a of lx: lx[['a']] or lx$a
Might be a matter of taste, but I like the $ very much. Unfortunately,
You can convert this to list:
as.list(vx)$a
On Thu, Feb 25, 2010 at 6:53 PM, Matthias Gondan matthias-gon...@gmx.de wrote:
Dear R developers,
A great R feature is that elements of vectors, lists and dataframes can have
names:
vx = c(a=1, b=2)
lx = list(a=1, b=2)
Accessing element a of
2 matches
Mail list logo