Data Visualization , Mission - 2, Multiple line charts

Screen no. 6 . The code in the Answer for question is -
life_expec_sex_race <- life_expec >
filter((Sex == “Female” | Sex == “Male”) & (Race == “Black” | Race == “White”))

I am not getting right ans. in my own filter code - filter( Sex !=’ Both Sexes’ & Race !=’ All Races’).

Hi @sharathnandalike. The filter code provided is very close. It looks like the issue is spacing directly after the ' in each variable name. This code worked for me:

life_expec_sex_race <- life_expec %>%
  filter(Sex != 'Both Sexes' & Race != 'All Races')