Total noob to both Stackoverflow and R so please be gentle!
I'm trying to create a single graph in PowerBI using R that combines a boxplot with a barchart on a time-series x-axis. Something that looks like this: Boxplot w Barchart (also below).
What I'm trying to achieve is an x-axis that is the week number (Weeknum) and y-axis for the barchart that is the count of 'LDS' and secondary y-axis that is a cost-per-mile range for 'CAD_CPM.'
I am able to create the boxplot using the below code but cannot seem to figure out how to add in the bar chart.
Any and all help greatly appreciated! Thanks!
boxplot (
CAD_CPM~Weeknum
,data=dataset
,main="Cost Per Mile (CAD)"
,outline = FALSE
,ylab = "CPM (CAD)"
,xlab = ""
,col=(c("pink" , "light blue"))
)
PowerBI boxplot (also below)