0

I have two dataframes, first one is df_stud:

studID    Name
023       John
283       Mary
842       Jacob
211       Amy

and a second dataframe, df_fail:

studID
023
999
100
211
575

I want to retrieve studID values which is present in both dataframes, meaning 023 and 211 since it is present in both dataframe under the studID column

Meaning I want to return:

"023" "211"

How do i do this?

I'm thinking of something like:

fail_id <- df_stud$studID in df_fail$studID
Maxxx
  • 3,504
  • 4
  • 23
  • 43

0 Answers0