Skip to content

Commit

Permalink
cleanup for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
DanChaltiel committed Aug 16, 2022
1 parent aaf148a commit c5f11ac
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 50 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: crosstable
Title: Crosstables for Descriptive Analyses
Version: 0.4.1.9013
Version: 0.5.0
Authors@R:
c(person(given = "Dan",
family = "Chaltiel",
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Crosstables for descriptive analyses. See documentation at <https://danchaltiel.github.io/crosstable> and browse code at <https://github.com/DanChaltiel/crosstable>.
Crosstables for descriptive analyses. See documentation at <https://danchaltiel.github.io/crosstable/> and browse code at <https://github.com/DanChaltiel/crosstable>.

# crosstable 0.5.0 <sub><sup>(?)</sup></sub>
# crosstable 0.5.0 <sub><sup>2022-08-16</sup></sub>

#### New features

Expand Down
2 changes: 1 addition & 1 deletion R/flextable.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#' as_flextable(compact=TRUE, header_show_n=TRUE)
#'
#' #Renaming (because why not?)
#' crosstable(mtcars2, -model, by=vs, total="both", test=TRUE, effect=TRUE) %>%
#' crosstable(mtcars2, am, by=vs, total="both", test=TRUE, effect=TRUE) %>%
#' rename(ID=.id, math=variable, Tot=Total, lab=label, pval=test, fx=effect) %>%
#' as_flextable(by_header = "Engine shape",
#' generic_labels=list(id = "ID", variable = "math", total="Tot",
Expand Down
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ reference:
- compact
- plim
- confint_numeric
- narm
- is.crosstable
- peek
- title: "Effects and tests"
Expand Down
97 changes: 53 additions & 44 deletions codemeta.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
{
"@context": [
"https://doi.org/10.5063/schema/codemeta-2.0",
"http://schema.org"
],
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"identifier": "crosstable",
"description": "Create descriptive tables for continuous and categorical variables. \n Apply summary statistics and counting function, with or without a grouping variable, and create beautiful reports using 'rmarkdown' or 'officer'.\n You can also compute effect sizes and statistical tests if needed.",
"description": "Create descriptive tables for continuous and categorical variables. Apply summary statistics and counting function, with or without a grouping variable, and create beautiful reports using 'rmarkdown' or 'officer'. You can also compute effect sizes and statistical tests if needed.",
"name": "crosstable: Crosstables for Descriptive Analyses",
"relatedLink": ["https://danchaltiel.github.io/crosstable/", "https://CRAN.R-project.org/package=crosstable"],
"codeRepository": "https://github.com/DanChaltiel/crosstable/",
"relatedLink": [
"https://danchaltiel.github.io/crosstable/",
"https://CRAN.R-project.org/package=crosstable"
],
"issueTracker": "https://github.com/DanChaltiel/crosstable/issues/",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.4.0",
"version": "0.4.1.9012",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.1.2 (2021-11-01)",
"runtimePlatform": "R version 4.2.1 (2022-06-23 ucrt)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand All @@ -36,9 +30,6 @@
"@id": "https://orcid.org/0000-0003-3488-779X"
}
],
"contributor": {},
"copyrightHolder": {},
"funder": {},
"maintainer": [
{
"@type": "Person",
Expand All @@ -49,6 +40,18 @@
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "callr",
"name": "callr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=callr"
},
{
"@type": "SoftwareApplication",
"identifier": "covr",
Expand Down Expand Up @@ -257,6 +260,7 @@
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"version": ">= 3.0.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -290,14 +294,14 @@
"sameAs": "https://CRAN.R-project.org/package=waldo"
}
],
"softwareRequirements": [
{
"softwareRequirements": {
"1": {
"@type": "SoftwareApplication",
"identifier": "R",
"name": "R",
"version": ">= 3.1.0"
},
{
"2": {
"@type": "SoftwareApplication",
"identifier": "checkmate",
"name": "checkmate",
Expand All @@ -309,7 +313,19 @@
},
"sameAs": "https://CRAN.R-project.org/package=checkmate"
},
{
"3": {
"@type": "SoftwareApplication",
"identifier": "cli",
"name": "cli",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=cli"
},
"4": {
"@type": "SoftwareApplication",
"identifier": "dplyr",
"name": "dplyr",
Expand All @@ -322,7 +338,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=dplyr"
},
{
"5": {
"@type": "SoftwareApplication",
"identifier": "flextable",
"name": "flextable",
Expand All @@ -335,7 +351,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=flextable"
},
{
"6": {
"@type": "SoftwareApplication",
"identifier": "forcats",
"name": "forcats",
Expand All @@ -347,7 +363,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=forcats"
},
{
"7": {
"@type": "SoftwareApplication",
"identifier": "glue",
"name": "glue",
Expand All @@ -359,7 +375,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=glue"
},
{
"8": {
"@type": "SoftwareApplication",
"identifier": "lifecycle",
"name": "lifecycle",
Expand All @@ -371,10 +387,11 @@
},
"sameAs": "https://CRAN.R-project.org/package=lifecycle"
},
{
"9": {
"@type": "SoftwareApplication",
"identifier": "officer",
"name": "officer",
"version": ">= 0.4",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand All @@ -383,7 +400,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=officer"
},
{
"10": {
"@type": "SoftwareApplication",
"identifier": "purrr",
"name": "purrr",
Expand All @@ -395,7 +412,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=purrr"
},
{
"11": {
"@type": "SoftwareApplication",
"identifier": "rlang",
"name": "rlang",
Expand All @@ -408,12 +425,12 @@
},
"sameAs": "https://CRAN.R-project.org/package=rlang"
},
{
"12": {
"@type": "SoftwareApplication",
"identifier": "stats",
"name": "stats"
},
{
"13": {
"@type": "SoftwareApplication",
"identifier": "stringr",
"name": "stringr",
Expand All @@ -425,7 +442,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=stringr"
},
{
"14": {
"@type": "SoftwareApplication",
"identifier": "tibble",
"name": "tibble",
Expand All @@ -437,7 +454,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=tibble"
},
{
"15": {
"@type": "SoftwareApplication",
"identifier": "tidyr",
"name": "tidyr",
Expand All @@ -449,7 +466,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=tidyr"
},
{
"16": {
"@type": "SoftwareApplication",
"identifier": "tidyselect",
"name": "tidyselect",
Expand All @@ -460,21 +477,13 @@
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=tidyselect"
}
],
},
"SystemRequirements": null
},
"fileSize": "1505.19KB",
"releaseNotes": "https://github.com/DanChaltiel/crosstable/blob/master/NEWS.md",
"readme": "https://github.com/DanChaltiel/crosstable/blob/main/README.md",
"fileSize": "69746.257KB",
"contIntegration": "https://app.codecov.io/gh/DanChaltiel/crosstable?branch=main",
"contIntegration": ["https://app.codecov.io/gh/DanChaltiel/crosstable?branch=main", "https://github.com/DanChaltiel/crosstable/actions"],
"developmentStatus": "https://lifecycle.r-lib.org/articles/stages.html",
"keywords": [
"r",
"descriptive-statistics",
"rstats",
"html-report",
"frequency-table",
"msword",
"flextable",
"officer"
]
"keywords": ["r", "descriptive-statistics", "rstats", "html-report", "frequency-table", "msword", "flextable", "officer"]
}
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

## Test environments

* local R installation, R 4.1.1
* local R installation, R 4.2.1
* check_rhub()
* check_win_devel()

Expand Down
Binary file modified examples/vignette_officer.docx
Binary file not shown.
3 changes: 3 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Codecov
Consolas
CrosstableMacros
Ctrl
DanChaltiel
Deprecations
Github
Gohel's
Expand All @@ -19,6 +20,7 @@ Rmarkdown
Rmd
StackOverflow
Subheaders
autocomplete
autocompletion
autofit
autofitting
Expand Down Expand Up @@ -47,6 +49,7 @@ kbd
kendall
kruskal
labelled
larmarange
logrank
oducible
oneway
Expand Down
2 changes: 1 addition & 1 deletion man/as_flextable.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added man/figures/vignette_officer.docx
Binary file not shown.
11 changes: 11 additions & 0 deletions tests/testthat/test-flextable.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ test_that("flextable header by_header (monoby)", {
})
})

test_that("flextable generic_labels", {
expect_snapshot({
ct = crosstable(mtcars2, am, by=vs, total="both", test=TRUE, effect=TRUE) %>%
rename(ID=.id, math=variable, Tot=Total, lab=label, pval=test, fx=effect) %>%
as_flextable(by_header = "Engine shape",
generic_labels=list(id = "ID", variable = "math", total="Tot",
label = "lab", test = "pval", effect="fx"))
ct$header$dataset
})
})


test_that("flextable header header_show_n+pattern", {
expect_snapshot({
Expand Down

0 comments on commit c5f11ac

Please sign in to comment.