Skip to content
Prev 86 / 63424 Next

R-alpha: list assignment

This works in Splus:
$f:
[1] 1

$g:
[1] 2

In R both variants fail unless the name is already on the list. The
first one can be replaced by x$f, but there's seems to be no
substitute for the other one (oh yes I found one, but it's not fit to
print!). This comes up if you e.g. want to create a variable in a data
frame with a name given by a character string.