examine: Examine one or more variables

View source: R/examine.R

examineR Documentation

Examine one or more variables

Description

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.

Usage

examine(
  ...,
  stem = TRUE,
  plots = TRUE,
  extremeValues = 5,
  qqCI = TRUE,
  conf.level = 0.95
)

## S3 method for class 'examine'
print(x, ...)

## S3 method for class 'examine'
pander(
  x,
  headerPrefix = "",
  headerStyle = "**",
  secondaryHeaderPrefix = "",
  secondaryHeaderStyle = "*",
  ...
)

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

## S3 method for class 'examineBy'
print(x, ...)

## S3 method for class 'examineBy'
pander(
  x,
  headerPrefix = "",
  headerStyle = "**",
  secondaryHeaderPrefix = "",
  secondaryHeaderStyle = "*",
  tertairyHeaderPrefix = "--> ",
  tertairyHeaderStyle = "",
  separator = paste0("\n\n", repStr("-", 10), "\n\n"),
  ...
)

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.

stem

Whether to display a stem and leaf plot.

plots

Whether to display the plots generated by the ufs::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.

conf.level

The level of confidence of the confidence interval.

x

The object to print or pander.

headerPrefix, secondaryHeaderPrefix, tertairyHeaderPrefix

Prefixes for the primary, secondary header, and tertairy headers

headerStyle, secondaryHeaderStyle, tertairyHeaderStyle

Characteers to surround the primary, secondary, and tertairy headers with

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.

separator

Separator for the result blocks.

Details

This function basically just calls the descr function, optionally supplemented with calls to stem, ufs::dataShape().

Value

A list that is displayed when printed.

Author(s)

Gjalt-Jorn Peters

Maintainer: Gjalt-Jorn Peters gjalt-jorn@userfriendlyscience.com

Examples


### Look at the miles per gallon descriptives:
rosetta::examine(mtcars$mpg, stem=FALSE, plots=FALSE);

### Separate for the different number of cylinders:
rosetta::examineBy(
  mtcars$mpg, by=mtcars$cyl,
  stem=FALSE, plots=FALSE,
  extremeValues=FALSE
);



rosetta documentation built on March 7, 2023, 7:40 p.m.