Skip to content

Instantly share code, notes, and snippets.

@ocaoimh
Last active July 14, 2021 16:57
Show Gist options
  • Save ocaoimh/6a6a059be3d5cad3ca640210224800fd to your computer and use it in GitHub Desktop.
Save ocaoimh/6a6a059be3d5cad3ca640210224800fd to your computer and use it in GitHub Desktop.
# Create likert list object
LXP.data.items.likert <- likert(LXP.data.items)
# Summarize the data
summary(LXP.data.items.likert)
# Plot the data
plot(LXP.data.items.likert)
# Plot the data with colours to match our visual identity
plot(LXP.data.items.likert, colors=c('#023E8A', '#0077B6', '#CAF0F8', '#E85D04', '#FAA307'))
# Plot the data and add some percentages + title
title <- "User data for the LXP improvements"
plot(LXP.data.items.likert, plot.percents=TRUE, plot.percent.low=TRUE, plot.percent.high=TRUE, plot.percent.neutral=TRUE, text.size = 2, include.center=TRUE, colors=c('#023E8A', '#0077B6', '#CAF0F8', '#E85D04', '#FAA307')) + ggtitle(title)
#Plot the data with a histogram
plot(LXP.data.items.likert, plot.percents=TRUE, plot.percent.low=TRUE, plot.percent.high=TRUE, plot.percent.neutral=TRUE, text.size = 2, include.center=TRUE, include.histogram=TRUE, colors=c('#023E8A', '#0077B6', '#CAF0F8', '#E85D04', '#FAA307')) + ggtitle(title)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment