lurn_si_10_histogram: Uses ggplot2 to create a histogram for the LURN SI-10.

View source: R/lurn_si_10_histogram.R

lurn_si_10_histogramR Documentation

Uses ggplot2 to create a histogram for the LURN SI-10.

Description

For the binning of the histogram, intervals of [0, 2), [2, 4) and so on are used.

Usage

lurn_si_10_histogram(
  input,
  title = NULL,
  hist_caption_stats = TRUE,
  hist_color = "#7bccc4",
  digits = 1
)

Arguments

input

A dataframe containing LURN SI-10 items. Other columns may also be present. The items of the SI-10 must use the recommended names: SI10_Q1-SI10_Q10, and SI10_BOTHER. Case matters for the variable names. If the SI-10 has already been scored, the function will look for the score to create the plot. Otherwise, the function will attempt to score the SI-10 in order to create the histogram.

title

We encourage you to use a descriptive title for your plot. This is NULL by default, which will not include a title.

hist_caption_stats

Logical parameter allowing you to choose whether you would like LURN SI-10 statistics to be printed in the caption of your histogram.

hist_color

This is set to a pale blue-green by default ("#7bccc4"). If you prefer a black-and-white graph, we recommend "darkgray"

digits

The number of decimals to display in the histogram caption. (set to 1 by default).

Value

A ggplot2 object.

For the LURN SI-10 Item response coding

Items 1-8 are coded with 0-4; Items 9, 10 are coded with 0-3; the bother question is coded with 0-3. This coding must be respected in order for the plot to be properly produced.

Examples

## Not run: 
lurn_si_10_histogram(some_data,
title = "My title goes here")

## End(Not run)

jameswgriffith/lurn documentation built on July 30, 2023, 4:31 a.m.