samuel
September 4, 2019, 12:09pm
1
In the deprecated tidy_names() and set_tidy_names() functions there was a quiet parameter for suppressing messages about name repair. Why was this parameter removed from the tibble() and as_tibble() functions? It is quite useful in my opinion.
mara
September 9, 2019, 8:25pm
2
Hi @samuel ,
The maintainers discuss this choice in this issue in the tibble repo:
opened 09:39PM - 12 Aug 19 UTC
closed 09:01PM - 13 Aug 19 UTC
This feature request stems from https://github.com/tidyverse/readxl/issues/580, … where using `col_names = FALSE` always shows that column have been given some new name:
```r
library(readxl)
read_excel(readxl_example("clippy.xlsx"), col_names = FALSE)
#> New names:
#> * `` -> ...1
#> * `` -> ...2
#> # A tibble: 5 x 2
#> ...1 ...2
#> <chr> <chr>
#> 1 name value
#> 2 Name Clippy
#> 3 Species paperclip
#> 4 Approx date of death 39083
#> 5 Weight in grams 0.9
```
When programming internal procedures (through scripts or via an Rmd, say) it's often assumed that such renaming will occur without the need to see them as part of the output. Would it be possible to add an option to suppress these messages similar to what `suppressMessages` does?
```r
library(readxl)
suppressMessages(
read_excel(readxl_example("clippy.xlsx"), col_names = FALSE)
)
#> # A tibble: 5 x 2
#> ...1 ...2
#> <chr> <chr>
#> 1 name value
#> 2 Name Clippy
#> 3 Species paperclip
#> 4 Approx date of death 39083
#> 5 Weight in grams 0.9
```
My suggestion would be something like `quite = TRUE`, or `suppress_messages = TRUE`.
mara
September 9, 2019, 8:52pm
3
Related discussion in the issue in tidyverse principles repo, below:
opened 08:47PM - 12 Feb 19 UTC
interface
Should you provide control over verbosity?
At the function level or via some … big kill switch?
* Example of function level: `devtools::check(quiet = TRUE)`
* Example of higher level kill switch: option `usethis.quiet` affects all of the `ui_*()` functions
Context: I'm calling `check()` and `install()` and `test()` in `.Rmd` for R Packages. All of these functions make pretty strong assumptions that they're being run interactively. Such functions are easier to "write prose around" if there are ways to muffle, capture, and redact their output.
I think this might be analogous to `format()` and `print()` methods.