Learn R Programming

DFA.CANCOR (version 0.4.3)

DESCRIPTIVES: Descriptive statistcs for numeric variables

Description

Produces descriptive statistcs for numeric variables, possibly by a grouping variable.

Usage

DESCRIPTIVES(data, groups, variables, CI_level = 95, verbose)

Value

The returned output is a list with the descriptive statistics.

Arguments

data

A dataframe or numeric matrix where the rows are cases & the columns are the variables.

groups

(optional) The name of the groups variable in the dataframe, if there is one,
e.g., groups = 'Group'.

variables

(optional) The names of the continuous variables in the dataframe for the analyses, e.g., variables = c('varA', 'varB', 'varC').

CI_level

(optional) The confidence interval for the output, in whole numbers, e.g., CI_level = 95. The default is 95.

verbose

Should detailed results be displayed in the console?
The options are: TRUE (default) or FALSE.

Author

Brian P. O'Connor

Details

If "groups" is not specified, the analyses will be run on all of the variables in "data". If "variables" is specified, the analyses will be run on the "variables" in "data". If "groups" is specified, the analyses will be run for every value of "groups".

Examples

Run this code
# without a grouping variable
DESCRIPTIVES(data = data_DFA$Field_2012, variables = c('Actions','Thoughts'))

# \donttest{
# with a grouping variable
DESCRIPTIVES(data = data_DFA$Field_2012, 
          groups = 'Group', 
          variables = c('Actions','Thoughts'))
# }

Run the code above in your browser using DataLab