[Rd] Extending [ method to S4 class and drop argument (PR#9211)

From: <jverzani_at_gmail.com>
Date: Fri 08 Sep 2006 - 16:04:24 GMT


Full_Name: John Verzani
Version: 2.4.0 alpha (2006-09-05 r39134) OS: linux, gentoo 2.6.17
Submission from: (NULL) (163.238.43.26)

When extending the "[" method to a new S4 class, the default value for the drop argument is not being found. Here is a small example:

setClass("test",representation(x="character")) setMethod("[","test",function(x,i,j,...,drop=TRUE) {print(i);print(drop)}) a = new("test",x="fred")
a[1]

resulting in:

[1] 1
Error in print(drop) : argument "drop" is missing, with no default

I'm expecting TRUE for the value of drop. That's correct isn't?



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat Sep 09 03:16:21 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 08 Sep 2006 - 17:30:05 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.