Skip to contents

Describes an object.

Usage

describe(x, ...)

# S4 method for ANY
describe(x)

Arguments

x

An R object (should be a matrix or a data.frame).

...

Currently not used.

Value

describe() is called for its side-effects. Invisibly returns x.

See also

Other data summaries: sparsity()

Author

N. Frerebeau

Examples

## Create a data matrix
X <- matrix(sample(0:9, 15, TRUE), nrow = 3, ncol = 5)

## Add NA
k <- sample(1:15, 3, FALSE)
X[k] <- NA

## Sparsity
sparsity(X)
#> [1] 0

## Quick description
describe(X)
#> 3 observations with 5 variables:
#> * 5 numeric variables.
#> * 0 categorial variables.
#> * 0 binary variables.
#> 
#> Data checking:
#> * 0% of numeric values are zero.
#> * 0 variables with no variance.
#> 
#> Missing values:
#> * 3 observations (100%) containing missing values.
#> * 2 variables (40%) containing missing values.