Getting an object not found error while plotting a graph in ggplot2

QuestionsGetting an object not found error while plotting a graph in ggplot2
sethbeckerman5 Staff asked 4 years ago

I am trying to create a function that takes a data frame, an x-axis variable, and a y-axis variable to create a visual.
Here's my code:

When I run this code:

I get this error:
I have loaded the dataset and checked the data table, and it does have , yet I am getting this error. Could you please help me figure out where I am making a mistake?


View on Stack Overflow