diff --git a/README.Rmd b/README.Rmd index f67ec8fd..9c714661 100644 --- a/README.Rmd +++ b/README.Rmd @@ -5,9 +5,11 @@ output: df_print: kable fig_width: 8 fig_height: 6 + dev: svg --- ```{r, setup, include = FALSE} +options(cli.progress_show_after = Inf) knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" @@ -50,7 +52,7 @@ pak::pkg_install("qddyy/LearnNonparam") ``` - Test some data (`vector` | `data.frame` | `list`) - ```{r, test, include = FALSE} + ```{r, test} set.seed(2023) t$test(rnorm(20, mean = 1), rnorm(20, mean = 0)) ``` diff --git a/README.md b/README.md index e2d51e63..5df9bd3e 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,16 @@ pak::pkg_install("qddyy/LearnNonparam") - Test some data (`vector` \| `data.frame` \| `list`) + ``` r + set.seed(2023) + t$test(rnorm(20, mean = 1), rnorm(20, mean = 0)) + ``` + - Check the results ``` r t$p_value - #> [1] 0.0013138 + #> [1] 0.0013154 t$print(digits = 2) #> @@ -62,7 +67,7 @@ pak::pkg_install("qddyy/LearnNonparam") t$plot(binwidth = 1) ``` - + - Modify some attributes and see how the results change diff --git a/man/figures/README-results-1.png b/man/figures/README-results-1.png deleted file mode 100644 index 3498a366..00000000 Binary files a/man/figures/README-results-1.png and /dev/null differ diff --git a/man/figures/README-results-1.svg b/man/figures/README-results-1.svg index e2f25148..436f93d2 100644 --- a/man/figures/README-results-1.svg +++ b/man/figures/README-results-1.svg @@ -109,55 +109,55 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -165,422 +165,442 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - - - - + + + + + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - + + + + + + + + + @@ -590,30 +610,30 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/twosample_pmt.cpp b/src/twosample_pmt.cpp index bece3f47..473051e3 100644 --- a/src/twosample_pmt.cpp +++ b/src/twosample_pmt.cpp @@ -61,7 +61,7 @@ NumericVector twosample_pmt( } while (std::prev_permutation(where_x.begin(), where_x.end())); } else { for (int i = 0; i < total; i++) { - random_shuffle(c_xy); + random_shuffle(where_x); twosample_do(i, c_xy, statistic_func, statistic_permu, where_x, bar); } }