Learn R Programming

dtables (version 0.2.0)

dnumeric: Create standard descriptive statistics

Description

Wrapper for psych::describe that adds the name of the dataset and the variable being examined to its output. Used in dtable for multiple variables.

Usage

dnumeric(data, vnames, neat = TRUE, sizesort = FALSE)

Arguments

data
a data.frame
vnames
a single variable name to examine with psych::describe
neat
logical, returns rounded values if TRUE
sizesort
logical, returns sorted data by mean if TRUE

Value

Returns a data.frame with common descriptive statistics for a numeric variable, as defined in psych::describe, concatenated with the name of the dataset and the name of the variable.

See Also

See dtable

See describe for more details on the descriptive statistics returned

Examples

Run this code
# Single variable
dnumeric(iris2, "Sepal.Length")

# Use \link{\code{dtable}} for multiple variables

Run the code above in your browser using DataLab