I am trying to overlay individual subjects' data-points/scores to boxplots I've created with rCharts. I have seen one option from HighCharts is to create the boxplots as 'objects' which may be a clue as to how to get an individual's points into the boxplots (and this leaves open the ability to loop over all the individuals' scores across all categories).
My Vanilla boxplots are:
#Box-Plots
#Create a new Highchart
h2 <- Highcharts$new()
h2$set(series = list(list(name = "all scores", data = cat.stats)))
#Add axis details
h2$xAxis(
categories = levels(longdata$category)
)
h2$yAxis(
min = 0,
max = 100,
tickInterval = 10,
title = list(text = 'Scores (%)')
)
#Define the type of plot
h2$chart(
type = 'boxplot',
inverted = 'true')
#Give it a title
h2$title(
text = 'Your functioning across four domains and overall compared to the whole group'
)
h2
What I want though is handled in STATA (but without the interactivity):
What would be great is also the ability to add in a 'cut-score' line in the 'overall' category.