R Under development (unstable) (2025-11-06 r88990 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > library(fuzzyRankTests) > > options(digits=5) # avoid rounding differences > > x <- c(1, 2, 3, 4, 4, 4, 5, 6, 7) > y <- c(4, 5, 7, 7, 8, 9, 10, 11) > mu <- 0 > tol <- sqrt(.Machine$double.eps) > > .Call(fuzzyRankTests:::C_fpvranksum, x, y, mu, "less", tol) $knots [1] 0.00049362 0.00078157 0.00123406 0.00185109 0.00275607 0.00394899 0.00555327 [8] 0.00761004 $values [1] 0.000000 0.041667 0.166667 0.375000 0.625000 0.833333 0.958333 1.000000 > > .Call(fuzzyRankTests:::C_fpvranksum, x, y, mu, "two.sided", tol) $knots [1] 0.00098725 0.00156314 0.00246812 0.00370218 0.00551213 0.00789798 0.01110654 [8] 0.01522007 $values [1] 0.000000 0.041667 0.166667 0.375000 0.625000 0.833333 0.958333 1.000000 > > .Call(fuzzyRankTests:::C_fpvranksum, x, y, mu = -3, "two.sided", tol) $knots [1] 0.23587 0.27659 0.32127 0.37038 0.42345 0.48071 0.54142 0.60584 0.67297 [10] 0.74299 0.81481 0.88836 0.96257 $values [1] 0.000000 0.003125 0.021875 0.075000 0.175000 0.321875 0.500000 0.678125 [9] 0.825000 0.925000 0.978125 0.996875 1.000000 > > .Call(fuzzyRankTests:::C_fpvranksum, x, y, mu = -4, "two.sided", tol) $knots [1] 0.42345 0.48071 0.54142 0.60584 0.67297 0.74299 0.81481 0.88836 0.96257 [10] 1.00000 $values [1] 0.0000000 0.0052083 0.0364583 0.1250000 0.2864583 0.5000000 0.7135417 [8] 0.8750000 0.9687500 1.0000000 > > y <- c(-1, y) > > .Call(fuzzyRankTests:::C_fpvranksum, x, y, mu = -3, "two.sided", tol) $knots [1] 0.48943 0.54570 0.60481 0.66647 0.73044 0.79617 0.86331 0.93143 1.00000 $values [1] 0.000000 0.003125 0.021875 0.075000 0.175000 0.325000 0.521875 0.753125 [9] 1.000000 > > .Call(fuzzyRankTests:::C_fpvranksum, x, y, mu, "less", tol) $knots [1] 0.0070958 0.0093789 0.0122172 0.0157343 0.0199918 0.0251543 0.0312629 [8] 0.0385027 $values [1] 0.000000 0.041667 0.166667 0.375000 0.625000 0.833333 0.958333 1.000000 > > .Call(fuzzyRankTests:::C_fpvranksum, y, x, mu, "greater", tol) $knots [1] 0.0070958 0.0093789 0.0122172 0.0157343 0.0199918 0.0251543 0.0312629 [8] 0.0385027 $values [1] 0.000000 0.041667 0.166667 0.375000 0.625000 0.833333 0.958333 1.000000 > > set.seed(42) > x <- rnorm(10) > y <- rnorm(10) + 1.5 > .Call(fuzzyRankTests:::C_fpvranksum, sort(x), sort(y), mu, "two.sided", tol) $knots [1] 0.24745 0.27986 $values [1] 0 1 > > ##### Check that init.c actually protects against the segfault we got > ##### during development. > ##### It does once we got the name "R_init_fuzzyRankTests" right! > > try(.Call(fuzzyRankTests:::C_fpvranksum, y, x, mu, "great")) Error in .Call(fuzzyRankTests:::C_fpvranksum, y, x, mu, "great") : Incorrect number of arguments (4), expecting 5 for 'fpvranksum' > > > proc.time() user system elapsed 0.09 0.06 0.14