These functions are one of many R functions enabling users to assess variable descriptives. They have been developed to mimic SPSS' 'EXAMINE' syntax command ('Explore' in the menu) as closely as possible to ease the transition for new R users and facilitate teaching courses where both programs are taught alongside each other.

examine(..., stem = TRUE, plots = TRUE,
        extremeValues = 5, descr.include = NULL,
        qqCI = TRUE, conf.level = 0.95)
examineBy(..., by=NULL, stem = TRUE, plots = TRUE,
          extremeValues = 5, descr.include=NULL,
          qqCI = TRUE, conf.level=.95)

Arguments

The first argument is a list of variables to provide descriptives for. Because these are the first arguments, the other arguments must be named explicitly so R does not confuse them for something that should be part of the dots.

by

A variable by which to split the dataset before calling examine. This can be used to show the descriptives separate by levels of a factor.

stem

Whether to display a stem and leaf plot.

plots

Whether to display the plots generated by the dataShape function.

extremeValues

How many extreme values to show at either end (the highest and lowest values). When set to FALSE (or 0), no extreme values are shown.

qqCI

Whether to display confidence intervals in the QQ-plot.

descr.include

Which descriptives to include; see descr for more information.

conf.level

The level of confidence of the confidence interval.

Details

This function basically just calls the descr function, optionally supplemented with calls to stem, dataShape.

Value

A list that is displayed when printed.

See also

Examples

### Look at the miles per gallon descriptives: examine(mtcars$mpg, stem=FALSE, plots=FALSE);
#> ###### Descriptives for mtcars$mpg #> #> Describing the central tendency: #> mean median mode 95% CI mean #> 20.09 19.2 (multi) [17.92; 22.26] #> #> Describing the spread: #> var sd iqr se #> 36.32 6.027 7.45 1.065 #> #> Describing the range: #> min q1 q3 max #> 10.4 15.2 22.8 33.9 #> #> Describing the distribution shape: #> skewness kurtosis dip #> 0.6724 -0.02201 0.0569 #> #> Describing the sample size: #> total NA. valid #> 32 0 32 #> #> #> ###### Rows with lowest values: #> value #> 15 10.4 #> 16 10.4 #> 24 13.3 #> 7 14.3 #> 17 14.7 #> #> ###### Rows with highest values: #> value #> 26 27.3 #> 19 30.4 #> 28 30.4 #> 18 32.4 #> 20 33.9 #>
### Separate for the different number of cylinders: examineBy(mtcars$mpg, by=mtcars$cyl, stem=FALSE, plots=FALSE, extremeValues=FALSE, descr.include=c('central tendency', 'spread'));
#> ############################################################ #> 4 #> ############################################################ #> #> ###### Descriptives for mpg #> #> Describing the central tendency: #> mean median mode 95% CI mean #> 26.66 26 (multi) [23.63; 29.69] #> #> Describing the spread: #> var sd iqr se #> 20.34 4.51 7.6 1.36 #> #> #> ############################################################ #> 6 #> ############################################################ #> #> ###### Descriptives for mpg #> #> Describing the central tendency: #> mean median mode 95% CI mean #> 19.74 19.7 21 [18.4; 21.09] #> #> Describing the spread: #> var sd iqr se #> 2.113 1.454 2.9 0.5494 #> #> #> ############################################################ #> 8 #> ############################################################ #> #> ###### Descriptives for mpg #> #> Describing the central tendency: #> mean median mode 95% CI mean #> 15.1 15.2 (multi) [13.62; 16.58] #> #> Describing the spread: #> var sd iqr se #> 6.554 2.56 2.1 0.6842 #> #>