Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

inspect

Inspect objects


Description

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.

Usage

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)
}

mosaicCore

Common Utilities for Other MOSAIC-Family Packages

v0.9.0
GPL (>= 2)
Authors
Randall Pruim <rpruim@calvin.edu>, Daniel T. Kaplan <kaplan@macalester.edu>, Nicholas J. Horton <nhorton@amherst.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.