From 5c87537288e9fafe070a1767bcc5215cc6d3c3c3 Mon Sep 17 00:00:00 2001 From: Maxime Wack Date: Wed, 23 Mar 2022 23:26:34 +0100 Subject: [PATCH 1/3] Update documentation, and DESCRIPTION fix references to old URLs and previous usage. add badge for total downloads --- DESCRIPTION | 5 ++--- README.Rmd | 5 ++++- README.md | 4 +++- index.Rmd | 5 ++++- index.md | 2 ++ 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index fea163b..7593447 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,8 +6,7 @@ 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 @@ -15,7 +14,7 @@ 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, diff --git a/README.Rmd b/README.Rmd index e7b9dc8..c0a12b1 100644 --- a/README.Rmd +++ b/README.Rmd @@ -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. diff --git a/README.md b/README.md index 982c9c7..cf0a9f5 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/index.Rmd b/index.Rmd index 886bfab..83db340 100644 --- a/index.Rmd +++ b/index.Rmd @@ -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. diff --git a/index.md b/index.md index 1e5f608..06b3b46 100644 --- a/index.md +++ b/index.md @@ -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 From 63a36fbba4a71dfe6e7e7060ec574cc3240b4630 Mon Sep 17 00:00:00 2001 From: Maxime Wack Date: Thu, 24 Mar 2022 13:18:00 +0100 Subject: [PATCH 2/3] CRAN submission fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - change "≤ 0.01" to "< 0.01" and rebuild all doc - remove LazyData (no data) - add CRAN-SUBMISSION - update cran-comments.md --- .Rbuildignore | 3 ++- CRAN-SUBMISSION | 3 +++ DESCRIPTION | 1 - R/output.R | 10 +++++----- cran-comments.md | 3 +-- index.md | 34 +++++++++++++++++----------------- man/desc_output.Rd | 4 ++-- 7 files changed, 30 insertions(+), 28 deletions(-) create mode 100644 CRAN-SUBMISSION 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}} From 05b4bb2f5576115f3ab2c2e258e8f0587bbc877f Mon Sep 17 00:00:00 2001 From: Maxime Wack Date: Thu, 24 Mar 2022 13:23:13 +0100 Subject: [PATCH 3/3] Remove submodule --- .gitignore | 1 + .gitmodules | 3 --- docs | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) delete mode 160000 docs diff --git a/.gitignore b/.gitignore index 9610e8d..8483e7b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ index.html /TAGS doc Meta +docs diff --git a/.gitmodules b/.gitmodules index b19d1be..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "website"] - path = docs - url = git@github.com:desctable/desctable.github.io diff --git a/docs b/docs deleted file mode 160000 index c80233d..0000000 --- a/docs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c80233d437a49b77ca1f162ff5cb9d9a13c162e1