Skip to content

Commit

Permalink
Fix R CMD check errors on vignette for macOS-R 4.3 (#528)
Browse files Browse the repository at this point in the history
* narrow down workflows

* trigger ci

* fix

* fix

* reactive workflows, remove temp one

* foo [skip ci]

* Remove htmltools

* revert dummy change in rbuildignore

* compile -> build [skip ci]
  • Loading branch information
etiennebacher authored Jul 20, 2024
1 parent 842fc02 commit 539bba2
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 37 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: datawizard
Title: Easy Data Wrangling and Statistical Transformations
Version: 0.12.1
Version: 0.12.1.9000
Authors@R: c(
person("Indrajeet", "Patil", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0003-1995-6531", Twitter = "@patilindrajeets")),
Expand Down Expand Up @@ -49,7 +49,6 @@ Suggests:
ggplot2 (>= 3.5.0),
gt,
haven,
htmltools,
httr,
knitr,
lme4,
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# datawizard (development version)

* Remove `htmltools` from `Suggests` in an attempt of fixing an error in CRAN
checks due to failures to build a vignette (#528).

# datawizard 0.12.1

This is a patch release to fix one error on CRAN checks occurring because of a
Expand Down
41 changes: 20 additions & 21 deletions vignettes/selection_syntax.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ knitr::opts_chunk$set(
pkgs <- c(
"datawizard",
"dplyr",
"htmltools"
"dplyr"
)
if (!all(vapply(pkgs, requireNamespace, quietly = TRUE, FUN.VALUE = logical(1L)))) {
Expand All @@ -27,18 +26,10 @@ if (!all(vapply(pkgs, requireNamespace, quietly = TRUE, FUN.VALUE = logical(1L))
```{r load, echo=FALSE, message=FALSE}
library(datawizard)
library(dplyr)
library(htmltools)
set.seed(123)
iris <- iris[sample(nrow(iris), 10), ]
row.names(iris) <- NULL
row <- function(...) {
div(
class = "custom_note",
...
)
}
```

```{css, echo=FALSE}
Expand Down Expand Up @@ -127,18 +118,26 @@ data_select(iris, contains("pal", "ec"))
data_select(iris, regex("^Sep|ies"))
```

```{r echo=FALSE}
row("Note: these functions are not exported by `datawizard` but are detected and
applied internally. This means that they won't be detected by autocompletion
when we write them.")
```

```{r echo=FALSE}
row("Note #2: because these functions are not exported, they will not create
conflicts with the ones that come from the `tidyverse` and that have the same name.
So we can still use `dplyr` and its friends, it won't change anything for selection
in `datawizard` functions!")
```
<!-- NOTE: use raw HTML so that vignette can compile even if `evaluate_chunk` is FALSE. -->
<!-- See e.g. #527 -->

<div class="custom_note">
<p>
Note: these functions are not exported by `datawizard` but are detected and
applied internally. This means that they won't be detected by autocompletion
when we write them.
</p>
</div>

<div class="custom_note">
<p>
Note #2: because these functions are not exported, they will not create
conflicts with the ones that come from the `tidyverse` and that have the same
name. Therefore, we can still use `dplyr` and its friends, it won't change
anything for selection in `datawizard` functions!
</p>
</div>


# Excluding variables
Expand Down
25 changes: 11 additions & 14 deletions vignettes/tidyverse_translation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ knitr::opts_chunk$set(
pkgs <- c(
"dplyr",
"datawizard",
"tidyr",
"htmltools"
"tidyr"
)
# since we explicitely put eval = TRUE for some chunks, we can't rely on
Expand All @@ -36,15 +35,6 @@ if (!all(vapply(pkgs, requireNamespace, quietly = TRUE, FUN.VALUE = logical(1L))
}
```

```{r echo=FALSE, message=FALSE, eval=evaluate_chunk}
row <- function(...) {
htmltools::div(
class = "custom_note",
...
)
}
```

This vignette can be referred to by citing the following:

Patil et al., (2022). datawizard: An R Package for Easy Data Preparation and Statistical Transformations. *Journal of Open Source Software*, *7*(78), 4684, https://doi.org/10.21105/joss.04684
Expand Down Expand Up @@ -82,9 +72,16 @@ In this article, we will see how to go through basic data wrangling steps with
This way, if you decide to make the switch, you can easily find the translations here.
This vignette is largely inspired from `{dplyr}`'s [Getting started vignette](https://dplyr.tidyverse.org/articles/dplyr.html).

```{r echo=FALSE}
row("Note: In this vignette, we use the native pipe-operator, `|>`, which was introduced in R 4.1. Users of R version 3.6 or 4.0 should replace the native pipe by magrittr's one (`%>%`) so that examples work.")
```
<!-- NOTE: use raw HTML so that vignette can compile even if `evaluate_chunk` is FALSE. -->
<!-- See e.g. #527 -->

<div class="custom_note">
<p>
Note: In this vignette, we use the native pipe-operator, `|>`, which was
introduced in R 4.1. Users of R version 3.6 or 4.0 should replace the native
pipe by magrittr's one (`%>%`) so that examples work.
</p>
</div>

```{r, eval = evaluate_chunk}
library(dplyr)
Expand Down

0 comments on commit 539bba2

Please sign in to comment.