tidyverse / tibble

A modern re-imagining of the data frame

Home Page:https://tibble.tidyverse.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tweak the view function

olivroy opened this issue · comments

Hi, could the view function use rlang::is_interactive() so it is easier to tweak and silence it with

options(rlang_interactive = FALSE)

https://rlang.r-lib.org/reference/is_interactive.html?q=interactive#null

I'd be happy to contribute a PR, just changing this line

if (!interactive()) return(invisible(x))

with

if (!rlang::is_interactive())   return(invisible(x))

Thanks

When writing code, I put calls to view in some places, but it would be handy to deactivate them when sourcing, instead of having to comment them out.

Edit: usethis asks that code doesn't contain interactive()
https://github.com/r-lib/usethis/blob/main/.github/workflows/lint-undesirable-functions.yaml#L64