describe: Description of variables

Description Usage Arguments Details Value

View source: R/data_structure.R

Description

Describes a vector or the columns in a matrix or data frame.

Usage

1
2
describe(dataset, num.desc = c("min", "quantile0.25", "median", "mean",
  "quantile0.75", "max", "var", "sd", "valid.n"))

Arguments

dataset

A vector, matrix or data frame.

num.desc

The names of the functions to apply to numeric data.

Details

describe displays a table of descriptive statistics for numeric, factor and logical variables in the object x. The summary measures for numeric variables can easily be altered with the argument num.desc. Pass a character vector with the names of the desired summary measures and these will be displayed at the top of the numeric block with their results beneath them. If quantiles are desired, the user will have to write wrapper functions that call quantile with the appropriate type or probabilities and use the names of the wrapper functions in num.desc. Remember that any function called by describe must have an na.rm argument.

Percentages are now always displayed and returned in the tables for factor and logical variables.

Value

A list with three components:

Numeric A list of the values returned from describe.numeric for each column described.

Factor A list of the tables for each column described.

Logical A list of the tables for each column described.


tajohu/GGenemy documentation built on Nov. 5, 2019, 9:44 a.m.