R: Determine whether column types should be shown

should_show_types {readr} | R Documentation

## Determine whether column types should be shown

### Description

Wrapper around `getOption("readr.show_col_types")` that implements some fall back logic if the option is unset. This returns:

- `TRUE` if the option is set to `TRUE`

- `FALSE` if the option is set to `FALSE`

- `FALSE` if the option is unset and we appear to be running tests

- `NULL` otherwise, in which case the caller determines whether to show column types based on context, e.g. whether `show_col_types` or actual `col_types` were explicitly specified

### Usage

    should_show_types()

[Package readr version 2.1.2 Index]