Skip to content
Prev 131421 / 398502 Next

$ operator is invalid for atomic vectors, returning NULL - what is the right thing to do then?

On 12/6/2007 7:04 AM, S?ren H?jsgaard wrote:
There's an announcement in the NEWS file for 2.6.0

DEPRECATED & DEFUNCT

     o	$ on an atomic vector now gives a warning that it is 'invalid'.
	It remains deprecated, but may be removed in R >= 2.7.0.

and an update in R-devel saying that in fact it has been made defunct there.

In answer to your questions:

1) I don't think so, other than x[1].
2) I don't remember the details, other than it was to avoid confusion. 
Maybe someone else can summarize the discussion?

Duncan Murdoch