Skip to contents

This function enables users to customize and review specific options for the osum package.

Usage

osum.options(
  osum.data.class.width,
  osum.format.extent,
  osum.information,
  osum.max.rows
)

Arguments

osum.data.class.width

integer indicating the width of the data.class field when it is a list (when objects.summary was called with all.classes = TRUE).

osum.format.extent

logical indicating whether the extent field should be formatted as product (d1 x d2) or left as list (d1, d2). Default: TRUE

osum.information

character vector specifying what information to return by default. This can be any subset of c("data.class", "storage.mode", "mode", "typeof", "extent", "object.size"), in any order. The default is to return all six types of information, in the order shown. osum.information is subject to partial matching, that is, only enough initial letters of each string element are needed to guarantee unique recognition.

osum.max.rows

integer, maximal number of rows to print.

Value

For osum.options(), a list of all the osum package options sorted by name. For osum.options(name), a list of length one containing the set value, or NULL if it is unset. For uses setting one or more options, a list with the previous values of the options changed (returned invisibly).

Details

Invoking osum.options() with no arguments returns a list with the current values of the osum package options. To access the value of a single option, one can pass a character string with its name name as argument, e.g. osum.options("osum.max.rows"), which will return a named list of length one with the option's value.

See also

options for global options, print.objects.summary and summary.objects.summary for using specific osum package options.

Examples

old_opt <- osum.options(osum.data.class.width = 12, osum.max.rows = 25)
cat("current values of all 'osum' options:", sep = "\n")
#> current values of all 'osum' options:
print(osum.options())
#> $osum.data.class.width
#> [1] 12
#> 
#> $osum.format.extent
#> [1] TRUE
#> 
#> $osum.information
#> [1] "data.class"   "storage.mode" "mode"         "typeof"       "extent"      
#> [6] "object.size" 
#> 
#> $osum.max.rows
#> [1] 25
#> 
cat("previous values of the changed 'osum' options:", sep = "\n")
#> previous values of the changed 'osum' options:
print(old_opt)
#> $osum.data.class.width
#> NULL
#> 
#> $osum.max.rows
#> NULL
#>