Browse Source

CRAN submission fixes

- change "≤ 0.01" to "< 0.01" and rebuild all doc
- remove LazyData (no data)
- add CRAN-SUBMISSION
- update cran-comments.md
tags/0.3.0^2
Maxime Wack 2 years ago
parent
commit
63a36fbba4
7 changed files with 30 additions and 28 deletions
  1. +2
    -1
      .Rbuildignore
  2. +3
    -0
      CRAN-SUBMISSION
  3. +0
    -1
      DESCRIPTION
  4. +5
    -5
      R/output.R
  5. +1
    -2
      cran-comments.md
  6. +17
    -17
      index.md
  7. +2
    -2
      man/desc_output.Rd

+ 2
- 1
.Rbuildignore View File

@@ -12,4 +12,5 @@
^pkgdown$
^index\.Rmd$
^index\.md$
^index\.html$
^index\.html$
^CRAN-SUBMISSION$

+ 3
- 0
CRAN-SUBMISSION View File

@@ -0,0 +1,3 @@
Version: 0.3.0
Date: 2022-03-24 11:45:24 UTC
SHA: 5c87537288e9fafe070a1767bcc5215cc6d3c3c3

+ 0
- 1
DESCRIPTION View File

@@ -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:


+ 5
- 5
R/output.R View File

@@ -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)
}


+ 1
- 2
cran-comments.md View File

@@ -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


+ 17
- 17
index.md View File

@@ -106,22 +106,22 @@ mtcars %>%
desc_output("pander")
```

|   | am = manual</br> (N = 13)</br> N | % | Median | IQR | am = automatic</br> (N = 19)</br> 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</br> (N = 13)</br> N | % | Median | IQR | am = automatic</br> (N = 19)</br> 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) !

+ 2
- 2
man/desc_output.Rd View File

@@ -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}}


Loading…
Cancel
Save