From imosqueira at suk.azti.es  Wed Oct  4 12:31:41 2006
From: imosqueira at suk.azti.es (Iago Mosqueira)
Date: Wed, 04 Oct 2006 12:31:41 +0200
Subject: [Rd] Default argument value for "["
In-Reply-To: <mailman.9.1159956004.28879.r-devel@r-project.org>
References: <mailman.9.1159956004.28879.r-devel@r-project.org>
Message-ID: <1159957901.14595.24.camel@localhost.localdomain>

Dear all,

After installing R 2.4.0, a definition of "[" for an S4 class has
stopped working as the default for drop in the generic, TRUE, appears to
override the default in the method

The method is defined for demonstration purposes as

setMethod("[", signature(x="FLQuant"),
	function(x, i="missing", j="missing", k="missing", l="missing",
		m="missing", ..., drop=FALSE) {

		print(drop)
	}
)

When called as

new('FLQuant')[1,]

drop is TRUE, instead of FALSE. Am I missing something? Has there been a
change in R 2.4.0 of relevance here? I could not find it in the NEWS
file.

Many thanks,


Iago Mosqueira




[Rd] Default argument value for "["
Iago Mosqueira