tidyverse/design

Options should only affect side-effects, not computation

hadley opened this issue · 0 comments

  • print() + options(digits, width)

  • install.packages() + options(repos)

  • readr::read_cs(), show_progress() and options(readr.show_progress = FALSE)

  • scale_colour_continuous() and getOption("ggplot2.continuous.colour", default = "gradient"))

  • crayon/cli

  • usethis::use_description_defaults()

Counter examples:

  • lubridate::wday(): week_start = getOption("lubridate.week.start", 7)
  • stringsAsFactors