Here's a glimpse of the dataset I'm using.

SpeedDating dataset:


The data set I'm using is SpeedDating. My goal is to look at whether or people prefer to date each other of the same race. I was working with the variables DecisionM, DecisionF, RaceM and RaceF, wherein the Decision variables, 1 = yes and 0 = no to a second date, with my end goal being able to visualize this in some ggplot chart. My code so far is as shows:

test <- SpeedDating %>%
  filter(DecisionM, DecisionF) %>%
   group_by(RaceM == "Caucasian") %>%
  group_by(RaceF == "Caucasian") %>%
  summarize(count = n()) %>% 
  filter(count == max(count))

I know I'm doing it wrong here but I don't know where to start, I thought about combining the two Race variables but I'm sure how to that right now either. Any help is appreciated. If you have any questions for me please ask.

New contributor
user115548 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.