plotVariables {exceldata}R Documentation

Return a list of univariate ggplots for each non-character variable

Description

This function should be run as the final step after the data have been imported, checked and the factor variables created.

Usage

plotVariables(data, dictionary, IDvar, vars, showOutliers = TRUE)

Arguments

data

A data frame containing the variables to be plotted

dictionary

Optional, the data dictionary returned by importExcelData or readDataDict functions to provide plot titles

IDvar

Optional string indicating the name of an identifying variable to highlight outliers

vars

Optional, vector of the names of variables to plot

showOutliers

Boolean, Defaults to TRUE. Should outliers be labelled? Outliers are defined by the 1.5xIQR rule (as with boxplots)

Value

A list of plots with one plot for each variable

Examples

## Not run: 
exampleDataFile <- system.file("extdata", "exampleData.xlsx", package = "exceldata")
import <- importExcelData(exampleDataFile,
dictionarySheet = 'DataDictionary',dataSheet = 'DataEntry')
dictionary <- import$dictionary
data <- import$data

# Simple univariate plots with outliers
plots <- plotVariables(data=data,dictionary=dictionary,IDvar = 'ID')
plots

## End(Not run)

[Package exceldata version 0.1.1.3 Index]