diff --git a/.Rbuildignore b/.Rbuildignore index 9b3d21e..83c5480 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,4 +12,5 @@ ^pkgdown$ ^index\.Rmd$ ^index\.md$ -^index\.html$ \ No newline at end of file +^index\.html$ +^CRAN-SUBMISSION$ diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION new file mode 100644 index 0000000..384ed92 --- /dev/null +++ b/CRAN-SUBMISSION @@ -0,0 +1,3 @@ +Version: 0.3.0 +Date: 2022-03-24 11:45:24 UTC +SHA: 5c87537288e9fafe070a1767bcc5215cc6d3c3c3 diff --git a/DESCRIPTION b/DESCRIPTION index 7593447..e26e067 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -12,7 +12,6 @@ Depends: pander License: GPL-3 Encoding: UTF-8 -LazyData: true URL: https://desctable.github.io BugReports: https://github.com/desctable/desctable/issues Imports: diff --git a/R/output.R b/R/output.R index fc5eecc..9d8d8a2 100644 --- a/R/output.R +++ b/R/output.R @@ -8,8 +8,8 @@ ##' } ##' ##' All numerical values will be rounded to the digits argument. -##' If statistical tests are presents, p values below 1E-digits will be replaced with "≤ 1E-digits" -##' (eg. "≤ 0.01" for values below 0.01 when digits = 2) +##' If statistical tests are presents, p values below 1E-digits will be replaced with "< 1E-digits" +##' (eg. "< 0.01" for values below 0.01 when digits = 2) ##' ##' @title desc_output ##' @param desctable The desctable to output @@ -65,7 +65,7 @@ output_df_grouped <- function(desctable, digits, ...) { tests$p[tests$p < 10^-digits] <- 10^-digits prettyNum(tests$p, digits = digits) %>% gsub(pattern = "^NA$", replacement = "") %>% - gsub(pattern = "^(0.0*1)$", replacement = "\u2264 \\1") -> tests$p + gsub(pattern = "^(0.0*1)$", replacement = "< \\1") -> tests$p table <- cbind(table, tests) } @@ -117,7 +117,7 @@ output_pander_grouped <- function(desctable, digits, ...) { tests$p[tests$p < 10^-digits] <- 10^-digits prettyNum(tests$p, digits = digits) %>% gsub(pattern = "^NA$", replacement = "") %>% - gsub(pattern = "^(0.0*1)$", replacement = "\u2264 \\1") -> tests$p + gsub(pattern = "^(0.0*1)$", replacement = "< \\1") -> tests$p table <- cbind(table, tests) } @@ -182,7 +182,7 @@ output_DT_grouped <- function(desctable, digits, ...) { tests$p[tests$p < 10^-digits] <- 10^-digits prettyNum(tests$p, digits = digits) %>% gsub(pattern = "^NA$", replacement = "") %>% - gsub(pattern = "^(0.0*1)$", replacement = "\u2264 \\1") -> tests$p + gsub(pattern = "^(0.0*1)$", replacement = "< \\1") -> tests$p table <- cbind(table, tests) } diff --git a/cran-comments.md b/cran-comments.md index cc197db..44e8b4a 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,5 @@ ## Test environments -* archlinux 64bits, R 3.4.0 -* centOS 6 64 bits, R 3.4.0 +* archlinux 64bits, R 4.1.3 * win-builder (devel and release) ## R CMD check results diff --git a/index.md b/index.md index 06b3b46..a8eb80a 100644 --- a/index.md +++ b/index.md @@ -106,22 +106,22 @@ mtcars %>% desc_output("pander") ``` -|   | am = manual
(N = 13)
N | % | Median | IQR | am = automatic
(N = 19)
N | % | Median | IQR | p | test | -|:-------------|:---------------------------------|:----|:-------|:-----|:------------------------------------|:----|:-------|:-----|:-------|:------------| -| mpg | 13 | | 23 | 9.4 | 19 | | 17 | 4.2 | ≤ 0.01 | wilcox.test | -| **cyl** | 13 | | | | 19 | | | | ≤ 0.01 | fisher.test | -|     4 | 8 | 62 | | | 3 | 16 | | | | | -|     6 | 3 | 23 | | | 4 | 21 | | | | | -|     8 | 2 | 15 | | | 12 | 63 | | | | | -| disp | 13 | | 120 | 81 | 19 | | 276 | 164 | ≤ 0.01 | wilcox.test | -| hp | 13 | | 109 | 47 | 19 | | 175 | 76 | 0.046 | wilcox.test | -| drat | 13 | | 4.1 | 0.37 | 19 | | 3.1 | 0.63 | ≤ 0.01 | wilcox.test | -| wt | 13 | | 2.3 | 0.84 | 19 | | 3.5 | 0.41 | ≤ 0.01 | wilcox.test | -| qsec | 13 | | 17 | 2.1 | 19 | | 18 | 2 | 0.27 | wilcox.test | -| **vs** | 13 | | | | 19 | | | | 0.56 | chisq.test | -|     V-shaped | 6 | 46 | | | 12 | 63 | | | | | -|     straight | 7 | 54 | | | 7 | 37 | | | | | -| gear | 13 | | 4 | 1 | 19 | | 3 | 0 | ≤ 0.01 | wilcox.test | -| carb | 13 | | 2 | 3 | 19 | | 3 | 2 | 0.74 | wilcox.test | +|   | am = manual
(N = 13)
N | % | Median | IQR | am = automatic
(N = 19)
N | % | Median | IQR | p | test | +|:-------------|:---------------------------------|:----|:-------|:-----|:------------------------------------|:----|:-------|:-----|:--------|:------------| +| mpg | 13 | | 23 | 9.4 | 19 | | 17 | 4.2 | \< 0.01 | wilcox.test | +| **cyl** | 13 | | | | 19 | | | | \< 0.01 | fisher.test | +|     4 | 8 | 62 | | | 3 | 16 | | | | | +|     6 | 3 | 23 | | | 4 | 21 | | | | | +|     8 | 2 | 15 | | | 12 | 63 | | | | | +| disp | 13 | | 120 | 81 | 19 | | 276 | 164 | \< 0.01 | wilcox.test | +| hp | 13 | | 109 | 47 | 19 | | 175 | 76 | 0.046 | wilcox.test | +| drat | 13 | | 4.1 | 0.37 | 19 | | 3.1 | 0.63 | \< 0.01 | wilcox.test | +| wt | 13 | | 2.3 | 0.84 | 19 | | 3.5 | 0.41 | \< 0.01 | wilcox.test | +| qsec | 13 | | 17 | 2.1 | 19 | | 18 | 2 | 0.27 | wilcox.test | +| **vs** | 13 | | | | 19 | | | | 0.56 | chisq.test | +|     V-shaped | 6 | 46 | | | 12 | 63 | | | | | +|     straight | 7 | 54 | | | 7 | 37 | | | | | +| gear | 13 | | 4 | 1 | 19 | | 3 | 0 | \< 0.01 | wilcox.test | +| carb | 13 | | 2 | 3 | 19 | | 3 | 2 | 0.74 | wilcox.test | Read more in the [vignette](articles/desctable.html) ! diff --git a/man/desc_output.Rd b/man/desc_output.Rd index 30daa18..d6aabb3 100644 --- a/man/desc_output.Rd +++ b/man/desc_output.Rd @@ -30,8 +30,8 @@ Currently available formats are\itemize{ } All numerical values will be rounded to the digits argument. -If statistical tests are presents, p values below 1E-digits will be replaced with "≤ 1E-digits" -(eg. "≤ 0.01" for values below 0.01 when digits = 2) +If statistical tests are presents, p values below 1E-digits will be replaced with "< 1E-digits" +(eg. "< 0.01" for values below 0.01 when digits = 2) } \seealso{ \code{\link[DT]{datatable}}