GLAD_plot: Plot Variables in GLAD Data

Description Usage Arguments Value

View source: R/glad_plot.r

Description

Generates plots for the specified variable in the GLAD data.

Usage

1
2
3
4
5
6
7
8
9
GLAD_plot(
  data,
  var,
  title = NULL,
  include_outlier = TRUE,
  limits = NULL,
  binwidth = 1,
  googlesheet
)

Arguments

data

The dataframe containing the variable to be plotted.

var

A character string of one element specifying the variable to be plotted

title

A character string. Only applies to categorical variables that allow multiple options to be selected.

include_outlier

A logical. Whether to include cases exceeding the minimum and maximum in the dictionary, if they exist in 'data'.

limits

A numeric vector of two elements, to be used as minimum and maximum when 'include_outlier' is 'FALSE'.

binwidth

A number or a character string "FD". Only applies to continuous variables. If specified as "FD", the Freedman-Diaconis rule for deciding optimal binwidth will be applied.

googlesheet

A googlesheet produced by "GLAD_sheet" that contain the dictionary sheet of the variables in 'data'.

Value

For non-continuous variables, a single ggplot object. For continuous variables, a named list of ggplot objects.


lyh970817/gladfunctions documentation built on Sept. 19, 2021, 2:01 p.m.