Mapping should be created with `aes()` or `aes_()`

Viewing other questions similar to this has not solved my problem.

dataset is called StudentPerformance attributes are absences and G3(grades) libraries installed:

Library("ggplot2")
library("plyr")
library("dplyr")
library("caret")
Library("magrittr")

StudentPerformance%>%
group_by(absences)%>%
ggplot(StudentPerformance, aes(x=G3,y=absences))+
geom_density(alpha=0.5)

The error i am getting is Error in `ggplot()`:
! Mapping should be created with `aes()` or `aes_()`.
Run `rlang::last_error()` to see where the error 
occurred.
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum