Reconciles the parameters with the arguments from xl()
and
stores the new defaults session in options()
Examples
(store_options <- getOption('xlr.xl'))
#> NULL
set_xl_args(reset = TRUE)
#> ℹ Removing existing `xl()` default arguments:
#>
#> NULL
#>
set_xl_args(.quiet = TRUE, .tabname_spec = list(zoom = 65))
#> ℹ Options set:
#>
#> $.quiet
#> [1] TRUE
#>
#> $.tabname_spec
#> $.tabname_spec$zoom
#> [1] 65
#>
#>
#>
getOption('xlr.xl')
#> $.quiet
#> [1] TRUE
#>
#> $.tabname_spec
#> $.tabname_spec$zoom
#> [1] 65
#>
#>
set_xl_args(.workbook_spec = list(asTable = FALSE, zoom = 85, withFilter = TRUE))
#> ℹ Options set:
#>
#> $.quiet
#> [1] TRUE
#>
#> $.tabname_spec
#> $.tabname_spec$zoom
#> [1] 65
#>
#>
#> $.workbook_spec
#> $.workbook_spec$asTable
#> [1] FALSE
#>
#> $.workbook_spec$zoom
#> [1] 85
#>
#> $.workbook_spec$withFilter
#> [1] TRUE
#>
#>
#>
getOption('xlr.xl')
#> $.quiet
#> [1] TRUE
#>
#> $.tabname_spec
#> $.tabname_spec$zoom
#> [1] 65
#>
#>
#> $.workbook_spec
#> $.workbook_spec$asTable
#> [1] FALSE
#>
#> $.workbook_spec$zoom
#> [1] 85
#>
#> $.workbook_spec$withFilter
#> [1] TRUE
#>
#>
set_xl_args(.quiet = FALSE, reset = TRUE)
#> ℹ Removing existing `xl()` default arguments:
#>
#> $.quiet
#> [1] TRUE
#>
#> $.tabname_spec
#> $.tabname_spec$zoom
#> [1] 65
#>
#>
#> $.workbook_spec
#> $.workbook_spec$asTable
#> [1] FALSE
#>
#> $.workbook_spec$zoom
#> [1] 85
#>
#> $.workbook_spec$withFilter
#> [1] TRUE
#>
#>
#>
#> ℹ Options set:
#>
#> $.quiet
#> [1] FALSE
#>
#>
set_xl_args(.sheet_titles = toupper)
#> ℹ Options set:
#>
#> $.quiet
#> [1] FALSE
#>
#> $.sheet_titles
#> function (x)
#> {
#> if (!is.character(x))
#> x <- as.character(x)
#> .Internal(toupper(x))
#> }
#> <bytecode: 0x55bd7ce9b0d0>
#> <environment: namespace:base>
#>
#>
# restore original options
set_xl_args(store_options, reset = TRUE)
#> ℹ Removing existing `xl()` default arguments:
#>
#> $.quiet
#> [1] FALSE
#>
#> $.sheet_titles
#> function (x)
#> {
#> if (!is.character(x))
#> x <- as.character(x)
#> .Internal(toupper(x))
#> }
#> <bytecode: 0x55bd7ce9b0d0>
#> <environment: namespace:base>
#>
#>
#> ℹ Options set:
#>
#> NULL
#>