Skip to content
Prev 37996 / 63424 Next

NULL assignment will change the expression's class into list

Vitalie Spinu wrote:
That's certainly an inconsistency, still present in a recent R-devel 
(but I haven't checked the latest beta).  I don't know if it's a bug:  
NULL assignments are handled specially in other situations (e.g. if te 
was a list to start, the NULL assignment would remove the "a" entry).

A simple workaround is to use

te["a"] <- expression(NULL)

or te <- te[-1]

instead, depending on what you expected to happen.

Duncan Murdoch