Skip to contents

Summarize an object of class objects.summary with some specific formatting options before using summary.data.frame.

Usage

# S3 method for class 'objects.summary'
summary(
  object,
  ...,
  data.class.width = getOption("osum.data.class.width", default = NULL),
  format.extent = getOption("osum.format.extent", default = TRUE)
)

Arguments

object

object of class objects.summary

...

further arguments to be passed down to summary.data.frame

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). Default: getOption("osum.data.class.width", default = NULL)

format.extent

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

Value

A matrix of class "table", obtained by applying summary to each column of the object (after applying the specific formatting according to the arguments' values) and collating the results.

Examples

os <- objects.summary("package:datasets")
print(summary(os, format.extent = FALSE, maxsum = 10, quantile.type = 7))
#>           data.class    storage.mode        mode          typeof  
#>  data.frame    :37   character: 2    character: 2   character: 2  
#>  ts            :28   double   :49    list     :48   double   :49  
#>  matrix        : 8   integer  : 5    numeric  :54   integer  : 5  
#>  nfnGroupedData: 7   list     :48                   list     :48  
#>  numeric       : 6                                                
#>  table         : 5                                                
#>  list          : 4                                                
#>  character     : 2                                                
#>  dist          : 2                                                
#>  (Other)       : 5                                                
#>         extent    object.size   
#>          50: 5   Min.   :  216  
#>          72: 4   1st Qu.: 1306  
#>           3: 3   Median : 2456  
#>         100: 3   Mean   : 6051  
#>          48: 2   3rd Qu.: 5838  
#>         150: 2   Max.   :64304  
#>        6, 2: 2                  
#>           2: 1                  
#>          11: 1                  
#>  (Other)   :81                  
print(summary(os, format.extent = TRUE, maxsum = 12, quantile.type = 1))
#>           data.class    storage.mode        mode          typeof  
#>  array         : 1   character: 2    character: 2   character: 2  
#>  character     : 2   double   :49    list     :48   double   :49  
#>  data.frame    :37   integer  : 5    numeric  :54   integer  : 5  
#>  dist          : 2   list     :48                   list     :48  
#>  factor        : 2                                                
#>  list          : 4                                                
#>  matrix        : 8                                                
#>  mts           : 2                                                
#>  nfnGroupedData: 7                                                
#>  numeric       : 6                                                
#>  table         : 5                                                
#>  ts            :28                                                
#>       extent    object.size   
#>  50      : 5   Min.   :  216  
#>  72      : 4   1st Qu.: 1264  
#>  100     : 3   Median : 2432  
#>  3       : 3   Mean   : 6051  
#>  150     : 2   3rd Qu.: 5816  
#>  48      : 2   Max.   :64304  
#>  6 x 2   : 2                  
#>  100 x 3 : 1                  
#>  100 x 4 : 1                  
#>  1000 x 5: 1                  
#>  108     : 1                  
#>  (Other) :79