Description Usage Arguments Details Author(s) Examples
The dataview package contains a number of option for tailoring its
behaviour. These options are stored as a named list in a single global
varible named "dataview". To overwrite an option fetch the default values
with default.options, modify the returned results and set it back as
in the example below.
1 2 3 | getOpt(x)
default.options()
|
x |
Option to retrieve. |
Below is a description of the available options,
but to understand how they work it is probably easier to directly study the
return value of default.options.
alignColumn alignment, left or right.
columnsA named list with columns to use in whos.
The object element should be a named list of functions to be
applied on each object that is to be queried.
The envir element should be a named list of functions to be
applied on the object or environment on which whos is
called together with its "accessors", which are object names
(for environments) or named indices (for everything else).
All functions should return a vector of values that can be used as
a data.table column.
printA named list of custom print functions.
By default each column of a whos object
is printed in a similar way as data.table or
data.frame. If you wish to override this behaviour for
a given column, please supply a named print function here.
The function will be given the column as returned by the corresponding
column function above, and should produce a character vector.
summaryA list of named summary functions. These are fed a column and should return a single value.
Christofer B<c3><a4>cklin
1 2 3 4 5 6 | # This shows how to modify a column presented by whos.
# The new function only reports the size of non-S4 objects
# to improve execution time.
opt <- default.options()
opt$columns$bytes <- function(x) if(isS4(x)) NA else object.size(x)
options(dataview = opt)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.