compare.toplines: Make a dot and ribbon plot comparing symmetrical questions

Description Usage Arguments Details Value Examples

View source: R/GraphFunctions.R

Description

compare.toplines creates a scatter plot with time on the x-axis

Usage

1
compare.toplines(varlist, vartext = NULL, mulaw, sortResponse, remove = NULL)

Arguments

varlist

a vector of quoted variable names

vartext

a character vector of text which should be used to describe the variables

mulaw

the relevant integ file

sortResponse

The response category in the topline tables by which to sort the vartext

remove

an optional vector of values to remove from the topline table, supplied to the remove argument in make.topline()

Details

This function takes a list of variables, makes toplines of them, and plots the toplines in a graph with one question per row and dots for the values of each question response.

Value

A ggplot object.

Examples

1
2
3
4
5
compare.toplines(varlist = c("d38", "d55", "d91", "d59", "d92"),
mulaw = demprimary,
vartext = c("Joe Biden", "Elizabeth Warren", "Kamala Harris", "Bernie Sanders", "Pete Buttigieg"),
sortResponse = "Favorable",
remove = c("don't know", "refused"))

jdjohn215/MLSPTools documentation built on Sept. 2, 2020, 1:16 a.m.