The R Project SVN R

Rev

Rev 87079 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 87079 Rev 88200
Line 219... Line 219...
219
[2,]    2    5
219
[2,]    2    5
220
> stopifnot(identical(d2[-1,], d2[2:3,]))
220
> stopifnot(identical(d2[-1,], d2[2:3,]))
221
> ## failed in R <= 2.1.x
221
> ## failed in R <= 2.1.x
222
> 
222
> 
223
> 
223
> 
224
> ## Fritz' S4 "odditiy"
224
> ## Fritz' S4 "oddity"
225
> setClass("X", representation(bar="numeric"))
225
> setClass("X", representation(bar="numeric"))
226
> setClass("Y", contains="X")
226
> setClass("Y", contains="X")
227
> ## Now we define a generic foo() and two different methods for "X" and
227
> ## Now we define a generic foo() and two different methods for "X" and
228
> ## "Y" objects for arg missing:
228
> ## "Y" objects for arg missing:
229
> setGeneric("foo", function(object, arg) standardGeneric("foo"))
229
> setGeneric("foo", function(object, arg) standardGeneric("foo"))