remove data point from ggplot

Hello, I'm just starting to learn R.

How can a data point be removed from ggplot?
I would like to remove the "Total Age" row as it's skewing the plot.

All help and guidance is appreciated.

Examples below...


my_data <- read.csv(file = 'Age_data.csv', header = TRUE)
ggplot(my_data) +
  geom_point(aes(x=Characteristics, y=Male))

Example of data below...

I would use the dplyr function filter().


my_data <- read.csv(file = 'Age_data.csv', header = TRUE)

my_data %>%
  filter(Characteristics != "Total Age") %>%
  ggplot(aes(x=Characteristics, y=Male)) +

Thank you very much! :+1:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.