I have three different variables: student_name (string), friend_name(string) and school_grade(byte). The data has been reshaped into a long format. Thus there are five friends (friend_name) for every individual (student_name). I want to check whether the entries under friend_name match with any of the entries within student_name, for each school grade combination.