Browse Source

Merge branch 'dev'

tags/0.3.0
Maxime Wack 2 years ago
parent
commit
41f6572d4a
13 changed files with 46 additions and 38 deletions
  1. +2
    -1
      .Rbuildignore
  2. +1
    -0
      .gitignore
  3. +0
    -3
      .gitmodules
  4. +3
    -0
      CRAN-SUBMISSION
  5. +2
    -4
      DESCRIPTION
  6. +5
    -5
      R/output.R
  7. +4
    -1
      README.Rmd
  8. +3
    -1
      README.md
  9. +1
    -2
      cran-comments.md
  10. +0
    -1
      docs
  11. +4
    -1
      index.Rmd
  12. +19
    -17
      index.md
  13. +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$

+ 1
- 0
.gitignore View File

@@ -5,3 +5,4 @@ index.html
/TAGS
doc
Meta
docs

+ 0
- 3
.gitmodules View File

@@ -1,3 +0,0 @@
[submodule "website"]
path = docs
url = git@github.com:desctable/desctable.github.io

+ 3
- 0
CRAN-SUBMISSION View File

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

+ 2
- 4
DESCRIPTION View File

@@ -6,16 +6,14 @@ Authors@R: c(person("Maxime", "Wack", email = "maximewack@free.fr", role = c("au
person("Yihui", "Xie", email = "xieyihui@gmail.com", role = c("ctb")))
Description: Easily create descriptive and comparative tables.
It makes use and integrates directly with the tidyverse family of packages, and pipes.
Tables are produced as data frames/lists of data frames for easy manipulation after creation,
and ready to be saved as csv, or piped to DT::datatable() or pander::pander() to integrate into reports.
Tables are produced as (nested) dataframes for easy manipulation.
Depends:
R (>= 3.2.3),
pander
License: GPL-3
Encoding: UTF-8
LazyData: true
URL: https://desctable.github.io
BugReports: https://github.com/maximewack/desctable/issues
BugReports: https://github.com/desctable/desctable/issues
Imports:
dplyr,
DT,


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


+ 4
- 1
README.Rmd View File

@@ -7,7 +7,10 @@ output: github_document
knitr::opts_chunk$set(message = F, warning = F)
```

[![Travis-CI Build Status](https://travis-ci.org/desctable/desctable.svg?branch=master)](https://travis-ci.org/desctable/desctable) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/desctable)](https://cran.r-project.org/package=desctable) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/desctable)](https://www.r-pkg.org:443/pkg/desctable)
[![Travis-CI Build Status](https://travis-ci.org/desctable/desctable.svg?branch=master)](https://travis-ci.org/desctable/desctable)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/desctable)](https://cran.r-project.org/package=desctable)
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/desctable)](https://www.r-pkg.org:443/pkg/desctable)
[![CRAN RStudio mirror total downloads](http://cranlogs.r-pkg.org/badges/grand-total/desctable)](https://www.r-pkg.org:443/pkg/desctable)

**Warning to existing users**
*This version introduces a new API that should make the creation of tables more flexible.


+ 3
- 1
README.md View File

@@ -2,10 +2,12 @@ Desctable
================

[![Travis-CI Build
Status](https://travis-ci.org/desctable/desctable.svg?branch=master)](https://travis-ci.org/desctable/desctable)
Status](https://travis-ci.org/desctable/desctable.svg?branch=master)](https://travis-ci.org/desctable/desctable)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/desctable)](https://cran.r-project.org/package=desctable)
[![CRAN RStudio mirror
downloads](http://cranlogs.r-pkg.org/badges/desctable)](https://www.r-pkg.org:443/pkg/desctable)
[![CRAN RStudio mirror total
downloads](http://cranlogs.r-pkg.org/badges/grand-total/desctable)](https://www.r-pkg.org:443/pkg/desctable)

**Warning to existing users**
*This version introduces a new API that should make the creation of


+ 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


+ 0
- 1
docs

@@ -1 +0,0 @@
Subproject commit c80233d437a49b77ca1f162ff5cb9d9a13c162e1

+ 4
- 1
index.Rmd View File

@@ -7,7 +7,10 @@ output: github_document
knitr::opts_chunk$set(message = F, warning = F)
```

[![Travis-CI Build Status](https://travis-ci.org/desctable/desctable.svg?branch=master)](https://travis-ci.org/desctable/desctable) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/desctable)](https://cran.r-project.org/package=desctable) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/desctable)](https://www.r-pkg.org:443/pkg/desctable)
[![Travis-CI Build Status](https://travis-ci.org/desctable/desctable.svg?branch=master)](https://travis-ci.org/desctable/desctable)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/desctable)](https://cran.r-project.org/package=desctable)
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/desctable)](https://www.r-pkg.org:443/pkg/desctable)
[![CRAN RStudio mirror total downloads](http://cranlogs.r-pkg.org/badges/grand-total/desctable)](https://www.r-pkg.org:443/pkg/desctable)

**Warning to existing users**
*This version introduces a new API that should make the creation of tables more flexible.


+ 19
- 17
index.md View File

@@ -6,6 +6,8 @@ Status](https://travis-ci.org/desctable/desctable.svg?branch=master)](https://tr
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/desctable)](https://cran.r-project.org/package=desctable)
[![CRAN RStudio mirror
downloads](http://cranlogs.r-pkg.org/badges/desctable)](https://www.r-pkg.org:443/pkg/desctable)
[![CRAN RStudio mirror total
downloads](http://cranlogs.r-pkg.org/badges/grand-total/desctable)](https://www.r-pkg.org:443/pkg/desctable)

**Warning to existing users**
*This version introduces a new API that should make the creation of
@@ -104,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