Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
qddyy committed Jun 8, 2024
1 parent b5de5e7 commit 5741b4d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 31 deletions.
2 changes: 1 addition & 1 deletion R/CDF.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ CDF <- R6Class(
private$.data <- sort(private$.data)
},

.calculate_side = function() {},
.calculate_side = function() NULL,

.calculate_extra = function() {
n <- length(private$.data)
Expand Down
62 changes: 32 additions & 30 deletions R/pmt.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@
implemented <- list(
onesample.quantile = Quantile,
onesample.cdf = CDF,

twosample.difference = Difference,
twosample.wilcoxon = Wilcoxon,
twosample.scoresum = ScoreSum,
twosample.ansari = AnsariBradley,
twosample.siegel = SiegelTukey,
twosample.rmd = RatioMeanDeviance,
twosample.ks = KolmogorovSmirnov,

ksample.oneway = OneWay,
ksample.kw = KruskalWallis,
ksample.jt = JonckheereTerpstra,

multcomp.studentized = Studentized,

paired.sign = Sign,
paired.difference = PairedDifference,

rcbd.oneway = RCBDOneWay,
rcbd.friedman = Friedman,
rcbd.page = Page,

association.corr = Correlation,

table.chisq = ChiSquare
)


#' @title Syntactic Sugar for Object Construction
#'
#' @description Construct test objects in a unified way.
#'
#' @name pmt


#' @rdname pmt
#'
#' @param key a character string corresponding to the desired test. Check `pmts()` for valid keys.
Expand Down Expand Up @@ -60,35 +92,6 @@ pmts <- function(
)
}

implemented <- list(
onesample.quantile = Quantile,
onesample.cdf = CDF,

twosample.difference = Difference,
twosample.wilcoxon = Wilcoxon,
twosample.scoresum = ScoreSum,
twosample.ansari = AnsariBradley,
twosample.siegel = SiegelTukey,
twosample.rmd = RatioMeanDeviance,
twosample.ks = KolmogorovSmirnov,

ksample.oneway = OneWay,
ksample.kw = KruskalWallis,
ksample.jt = JonckheereTerpstra,

multcomp.studentized = Studentized,

paired.sign = Sign,
paired.difference = PairedDifference,

rcbd.oneway = RCBDOneWay,
rcbd.friedman = Friedman,
rcbd.page = Page,

association.corr = Correlation,

table.chisq = ChiSquare
)

#' @rdname pmt
#'
Expand Down Expand Up @@ -116,7 +119,6 @@ implemented <- list(
#'
#' Defining the test statistic using `R` follows a similar approach. The purpose of this design is to pre-calculate certain constants that remain invariant during permutation.
#'
#'
#' @export
#'
#' @importFrom R6 R6Class
Expand Down

0 comments on commit 5741b4d

Please sign in to comment.