File: setup.Rmd

package info (click to toggle)
r-cran-tidyselect 1.2.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 616 kB
  • sloc: sh: 13; makefile: 2
file content (34 lines) | stat: -rw-r--r-- 642 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

library(tidyselect)
library(magrittr)

# For examples
rename <- function(.x, ..., .strict = TRUE) {
  pos <- eval_rename(rlang::expr(c(...)), .x, strict = .strict)
  names(.x)[pos] <- names(pos)
  .x
}
select <- function(.x, ..., .strict = TRUE) {
  pos <- eval_select(rlang::expr(c(...)), .x, strict = .strict)
  rlang::set_names(.x[pos], names(pos))
}

# Better printing
mtcars <- tibble::as_tibble(mtcars)
iris <- tibble::as_tibble(iris)
options(
  tibble.print_min = 4,
  tibble.print_max = 4
)

# Fix Latex error
options(
  cli.unicode = FALSE
)
```