Skip to contents

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

Usage

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

Arguments

x

object of class objects.summary

...

further arguments to be passed down to print.data.frame (should not include max)

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)

max.rows

integer, maximal number of rows to print. Default: getOption("osum.max.rows", default = NULL)

Value

No return value, called for side effects.

Details

max.rows computes an adequate value to be passed as max argument to print.data.frame. By default, when NULL, getOption("max.print") is used by print.data.frame.

Examples

print(objects.summary("package:datasets", all.classes = FALSE),
    format.extent = FALSE, max.rows = 6)
#>                   data.class storage.mode    mode typeof     extent object.size
#> AirPassengers             ts       double numeric double        144        1616
#> BJsales                   ts       double numeric double        150        1664
#> BJsales.lead              ts       double numeric double        150        1664
#> BOD               data.frame         list    list   list       6, 2        1176
#> CO2           nfnGroupedData         list    list   list      84, 5        9976
#> ChickWeight   nfnGroupedData         list    list   list     578, 4       22696
#>  [ reached 'max' / getOption("max.print") -- omitted 98 rows ]
print(objects.summary("package:datasets", all.classes = TRUE, data.class = "array"),
    data.class.width = 22, format.extent = TRUE, max.rows = 6)
#>                                   data.class storage.mode    mode typeof
#> EuStockMarkets        mts, ts, matrix, array       double numeric double
#> Seatbelts             mts, ts, matrix, array       double numeric double
#> USPersonalExpenditure          matrix, array       double numeric double
#> VADeaths                       matrix, array       double numeric double
#> WorldPhones                    matrix, array       double numeric double
#> euro.cross                     matrix, array       double numeric double
#>                         extent object.size
#> EuStockMarkets        1860 x 4       60824
#> Seatbelts              192 x 8       13872
#> USPersonalExpenditure    5 x 5        1448
#> VADeaths                 5 x 4        1264
#> WorldPhones              7 x 7        1800
#> euro.cross             11 x 11        2944
#>  [ reached 'max' / getOption("max.print") -- omitted 5 rows ]