Hello, I want to create a boxplot from a dataset similar to the following:
- Date | Sales | Sales Rep
08/02 | 600 | Mike
08/02 | 400 | Jim
08/03 | 750 | Mike
08/03 | 450 | Jim
Comparing the "Sales" from the different "Sales Rep".
The issue I'm facing is that I can't get the graph to combine the "Sales" from the several days ("Date") into the respective "Sales Rep".
What are my options to make this work?
Ps. Sorry, I'm not allowed to post a picture of the real table.
library(ggplot2)
library(readxl)
library(tidyverse)
test_boxplot <- read_excel("C:/Users/Usuario/Desktop/test_boxplot.xlsx",
col_types = c("date", "skip", "skip", "skip", "skip",
"skip", "numeric", "text"))
test_boxplot %>%
ggplot(aes(x = 'Sales Rep',y = Total,group_by('Sales Rep'),fill = 'Sales Rep')) +
geom_boxplot()
#> Warning: Removed 33 rows containing non-finite values (stat_boxplot).
Created on 2020-08-03 by the reprex package (v0.3.0)