R-alpha: Making x[["a"]]<-NULL work

Ross Ihaka (ihaka@stat.auckland.ac.nz)
Wed, 11 Dec 1996 15:47:56 +1300 (NZDT)


From: Ross Ihaka <ihaka@stat.auckland.ac.nz>
Date: Wed, 11 Dec 1996 15:47:56 +1300 (NZDT)
Message-Id: <199612110247.PAA27450@stat13.stat.auckland.ac.nz>
To: R-testers mailing list <R-testers@stat.math.ethz.ch>
Subject: R-alpha: Making x[["a"]]<-NULL work

I have been making some changes so that
	x[["a"]]<-NULL
remove the component labelled "a" from the list x.

The semantics of this seems wrong to me.  I think that
	x["a"] <- NULL
should get rid of the component and
	x[["a"]] <- NULL
should set the "a"th component to NULL.

However, in the spirit of bug reproduction I will do it the S way.

In S, x["a"] <- NULL is a no-op.  Should we imitate this?
	Ross
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-