Skip to content

Commit

Permalink
Fixes for CRAN checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanChaltiel committed Apr 10, 2023
1 parent 8fc3328 commit ee012f6
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 46 deletions.
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 0.6.0
Date: 2023-03-26 18:53:52 UTC
SHA: 1eb54c938cf2dbe9fb2cdcde74bea728f5c693a7
Version: 0.6.1
Date: 2023-04-03 20:07:58 UTC
SHA: 8fc33289ec5f70e3c6b80c21233a1eeaa25b827c
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.6.0.9001
Version: 0.6.1
Authors@R:
c(person(given = "Dan",
family = "Chaltiel",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Crosstables for descriptive analyses. See documentation at <https://danchaltiel.github.io/crosstable/> and browse code at <https://github.com/DanChaltiel/crosstable>.

# crosstable 0.6.1 <sub><sup>2023-04-03</sup></sub>

Fixes for CRAN checks.

# crosstable 0.6.0 <sub><sup>2023-03-26</sup></sub>

#### New features
Expand Down
26 changes: 13 additions & 13 deletions R/officer.R
Original file line number Diff line number Diff line change
Expand Up @@ -582,19 +582,19 @@ body_add_img2 = function(doc, src, width, height,
#' @importFrom checkmate assert_class
#' @importFrom rlang check_installed
#' @examples
#' if(require("ggplot2") && capabilities(what = "png")){
#' library(officer)
#' p = ggplot(data = iris ) +
#' geom_point(mapping = aes(Sepal.Length, Petal.Length))
#'
#' options(crosstable_units="cm")
#' options(crosstable_style_image="centered")
#' doc = read_docx() %>%
#' body_add_normal("Text before") %>%
#' body_add_gg2(p, w=14, h=10, scale=1.5) %>% #or units="cm" instead of using options
#' body_add_normal("Text after")
#' #write_and_open(doc)
#' }
#' library(officer)
#' library(ggplot2)
#' p = ggplot(data = iris ) +
#' geom_point(mapping = aes(Sepal.Length, Petal.Length))
#' crosstable_options(
#' units="cm",
#' style_image="centered"
#' )
#' doc = read_docx() %>%
#' body_add_normal("Text before") %>%
#' body_add_gg2(p, w=14, h=10, scale=1.5) %>% #or units="cm" instead of using options
#' body_add_normal("Text after")
#' write_and_open(doc)
body_add_gg2 = function(doc, value, width = 6, height = 5,
units = getOption("crosstable_units", "in"),
style = getOption("crosstable_style_image", doc$default_styles$paragraph),
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ You can find the whole documentation on the [dedicated website](https://danchalt
+ `vignette("crosstable")` for a first step-by-step guide on how to use `crosstable` ([link](https://danchaltiel.github.io/crosstable/articles/crosstable.html))
+ `vignette("crosstable-report")` for more on creating MS Word reports using either `{officer}` or `Rmarkdown` ([link](https://danchaltiel.github.io/crosstable/articles/crosstable-report.html))
+ `vignette("pertent_pattern")` for more on how to use `percent_pattern` ([link](https://danchaltiel.github.io/crosstable/articles/crosstable-selection.html))
+ `vignette("crosstable-selection")` for more on variable selection ([link](https://danchaltiel.github.io/crosstable/articles/crosstable-selection.html)), although you would better read https://tidyselect.r-lib.org/articles/syntax.html.
+ `vignette("crosstable-selection")` for more on variable selection ([link](https://danchaltiel.github.io/crosstable/articles/crosstable-selection.html)), although you should better read https://tidyselect.r-lib.org/articles/syntax.html.


There are lots of other features you can learn about there, for instance (non-exhaustive list):
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ install.packages("crosstable")
devtools::install_github("DanChaltiel/crosstable", build_vignettes=TRUE)

# Install specific commit or tagged version (for reproducibility purpose)
devtools::install_github("DanChaltiel/crosstable@51689eb", build_vignettes=TRUE)
devtools::install_github("DanChaltiel/crosstable@8fc3328", build_vignettes=TRUE)
devtools::install_github("DanChaltiel/[email protected]", build_vignettes=TRUE)
```

Expand Down Expand Up @@ -92,8 +92,8 @@ to learn how).
Here is a more advanced example.

> Dear crosstable, using the `mtcars2` dataset again, please describe
> all columns whose name starts with “cy” and those whose name ends with
> “at”, depending on the levels of both columns `am` and `vs`, without
> all columns whose name starts with "cy" and those whose name ends with
> "at", depending on the levels of both columns `am` and `vs`, without
> considering labels, applying `mean()` and `quantile()` as summary
> function, with `probs` 25% and 75% defined for this latter function,
> and with 3 decimals for numeric variables:
Expand Down Expand Up @@ -136,18 +136,18 @@ website](https://danchaltiel.github.io/crosstable/):
([link](https://danchaltiel.github.io/crosstable/articles/crosstable-selection.html))
- `vignette("crosstable-selection")` for more on variable selection
([link](https://danchaltiel.github.io/crosstable/articles/crosstable-selection.html)),
although you would better read
although you should better read
<https://tidyselect.r-lib.org/articles/syntax.html>.

There are lots of other features you can learn about there, for instance
(non-exhaustive list):

- description of correlation, dates, and survival data
([link](https://danchaltiel.github.io/crosstable/articles/crosstable.html#miscellaneous-1))
- variable selection with functions, e.g. `is.numeric`
- variable selection with functions, e.g. `is.numeric`
([link](https://danchaltiel.github.io/crosstable/articles/crosstable-selection.html#select-with-predicate-functions))
- formula interface, allowing to describe more mutated columns,
e.g. `sqrt(mpg)` or `Surv(time, event)`
e.g. `sqrt(mpg)` or `Surv(time, event)`
([link](https://danchaltiel.github.io/crosstable/articles/crosstable-selection.html#select-with-a-formula))
- automatic computation of statistical tests
([link](https://danchaltiel.github.io/crosstable/articles/crosstable.html#tests))
Expand All @@ -161,7 +161,7 @@ There are lots of other features you can learn about there, for instance
If you have a question about how to use `crosstable`, please ask on
[StackOverflow](https://stackoverflow.com/) with the tag `crosstable`.
You can `@DanChaltiel` in a comment if you are struggling to get
answers. Dont forget to add a minimal **repr**oducible **ex**ample to
answers. Don't forget to add a minimal **repr**oducible **ex**ample to
your question, ideally using the [reprex](https://reprex.tidyverse.org/)
package.

Expand Down
17 changes: 15 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/DanChaltiel/crosstable/",
"issueTracker": "https://github.com/DanChaltiel/crosstable/issues/",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.6.0",
"version": "0.6.1",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -256,6 +256,18 @@
},
"sameAs": "https://CRAN.R-project.org/package=systemfonts"
},
{
"@type": "SoftwareApplication",
"identifier": "tidyselect",
"name": "tidyselect",
"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=tidyselect"
},
{
"@type": "SoftwareApplication",
"identifier": "testthat",
Expand Down Expand Up @@ -355,6 +367,7 @@
"@type": "SoftwareApplication",
"identifier": "forcats",
"name": "forcats",
"version": ">= 1.0.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -473,7 +486,7 @@
},
"SystemRequirements": null
},
"fileSize": "1502.912KB",
"fileSize": "1504.452KB",
"releaseNotes": "https://github.com/DanChaltiel/crosstable/blob/master/NEWS.md",
"readme": "https://github.com/DanChaltiel/crosstable/blob/main/README.md",
"contIntegration": ["https://app.codecov.io/gh/DanChaltiel/crosstable?branch=main", "https://github.com/DanChaltiel/crosstable/actions"],
Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Thank you very much.

## Comment

* No comment
* I removed one test on Mac as it seems to be an encoding problem
26 changes: 13 additions & 13 deletions man/body_add_gg2.Rd

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

8 changes: 4 additions & 4 deletions vignettes/crosstable-install.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ Try first with "no", and then with "yes" if it fails.

This error can happen on Mac. I have no clue on how to correct it. If you experience it, please create an [Issue](https://github.com/DanChaltiel/crosstable/issues) with the actual error message and the result of `sessionInfo()`.

> ERROR: configuration failed for package systemfonts
> * removing /Library/Frameworks/R.framework/Versions/3.6/Resources/library/systemfonts
> * restoring previous /Library/Frameworks/R.framework/Versions/3.6/Resources/library/systemfonts
> ERROR: configuration failed for package 'systemfonts'
> * removing '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/systemfonts'
> * restoring previous '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/systemfonts'
> Error: Failed to install 'crosstable' from GitHub:
> (converted from warning) installation of package systemfonts had non-zero exit status
> (converted from warning) installation of package 'systemfonts' had non-zero exit status
2 changes: 1 addition & 1 deletion vignettes/crosstable-report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ In this case, you have to manually update the references inside MS Word: select

## Create reports with `Rmarkdown`

<!-- Intégration Rmd in Rmd: la coloration syntaxique RStudio est mauvaise mais le code est bon ! -->
<!-- Integration Rmd in Rmd: la coloration syntaxique RStudio est mauvaise mais le code est bon ! -->
<!-- https://stackoverflow.com/questions/53226493/add-markdown-code-chunk-to-r-markdown-document#comment104859956_53226493 -->
Knitting (`knitr::knit()` or via **RStudio**) this `Rmd` code also creates a MS-Word file. Here, you can use the power of `bookdown` to generate the automatic numbering of the tables.

Expand Down

0 comments on commit ee012f6

Please sign in to comment.