From 5741b4d6d885c8433b47a9f11975e5fc4aab8261 Mon Sep 17 00:00:00 2001 From: qddyy Date: Sat, 8 Jun 2024 09:20:58 +0800 Subject: [PATCH] minor improvements --- R/CDF.R | 2 +- R/pmt.R | 62 +++++++++++++++++++++++++++++---------------------------- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/R/CDF.R b/R/CDF.R index d7239a2c..c4300aca 100644 --- a/R/CDF.R +++ b/R/CDF.R @@ -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) diff --git a/R/pmt.R b/R/pmt.R index 5c4fc190..5ca4f7e9 100644 --- a/R/pmt.R +++ b/R/pmt.R @@ -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. @@ -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 #' @@ -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