File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 102102
103103 \item Dataset \code {LifeCycleSavings } had a misspelled row name :
104104 \code {" Guatamala" } was corrected to \code {" Guatemala" }.
105+
106+ \item The \code {Pair(x ,y )} construction in the formula interface to
107+ paired tests did not work with the \code {subset } argument , due to the
108+ absence of a \code {[.Pair } method , which has now been added.
105109 }
106110 }
107111
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ S3method("[", formula)
115115S3method("[", terms)
116116S3method("[", ts)
117117S3method("[", tskernel)
118+ S3method("[", Pair)
118119S3method("[<-", ts)
119120S3method("[[", dendrogram)
120121S3method(add1, default)
Original file line number Diff line number Diff line change @@ -8,3 +8,16 @@ Pair <- function(x,y) {
88 class(pp ) <- " Pair"
99 pp
1010}
11+ `[.Pair` <- function (x , i , j , drop = FALSE )
12+ {
13+ if (missing(j )) {
14+ x <- unclass(x )[i , , drop = FALSE ]
15+ class(x ) <- " Pair"
16+ x
17+ }
18+ else {
19+ class(x ) <- " matrix"
20+ NextMethod(" [" )
21+ }
22+ }
23+
You can’t perform that action at this time.
0 commit comments