Print a short summary of the contents of an object. Most useful as a way to get a quick overview of the variables in data frame.

inspect(object, ...)

# S3 method for class 'list'
inspect(object, max.level = 2, ...)

# S3 method for class 'character'
inspect(object, ...)

# S3 method for class 'logical'
inspect(object, ...)

# S3 method for class 'numeric'
inspect(object, ...)

# S3 method for class 'factor'
inspect(object, ...)

# S3 method for class 'Date'
inspect(object, ...)

# S3 method for class 'POSIXt'
inspect(object, ...)

# S3 method for class 'data.frame'
inspect(object, select = TRUE, digits = getOption("digits", 3), ...)

# S3 method for class 'inspected_data_frame'
print(x, digits = NULL, ...)

Arguments

object

a data frame or a vector

...

additional arguments passed along to specific methods

max.level

an integer giving the depth to which lists should be expanded

select

a logical, character (naming variables), or numeric vector or a function used to select variables to which FUN is applied. If a function, it should take a vector as input and return a single logical. See examples here and at link{dfapply}.

digits

and integer giving the number of digits to display

x

an object

Examples

if (require(mosaicData)) {
  inspect(Births78)
  inspect(Births78, is.numeric)
}
#> 
#> quantitative variables:  
#>           name   class  min   Q1 median   Q3   max        mean         sd   n
#> 1       births integer 7135 8554   9218 9705 10711 9132.161644 817.882087 365
#> 2         year numeric 1978 1978   1978 1978  1978 1978.000000   0.000000 365
#> 3        month numeric    1    4      7   10    12    6.526027   3.452584 365
#> 4  day_of_year integer    1   92    183  274   365  183.000000 105.510663 365
#> 5 day_of_month integer    1    8     16   23    31   15.720548   8.808321 365
#> 6  day_of_week numeric    1    2      4    6     7    3.991781   2.006155 365
#>   missing
#> 1       0
#> 2       0
#> 3       0
#> 4       0
#> 5       0
#> 6       0