Seeking assistance with building correct function

Hello! Can someone please help me with this homework question?

My first dataset is a list of students in the honors program.
My second dataset is a list of class attendance school wide throughout the 4th Quarter. The honors students are listed within this dataset along with other students as well. Both datasets have a column for Student ID Numbers which identify the unique individual.
I am trying to find how many classes the honors students attended in the second dataset. I have tried this function but R gives me an error code about my input:

Can someone please help me craft the right function for this problem?

The only thing I see wrong with you function all is that ID is within curly quotes, not straight quotes. Compare your by=”ID” to by = "ID". However, that may be an artifact of type your message rather than your real code.
What error message are you getting?

Thank you for answering!
This is the error message I'm getting:
Error: unexpected input in "results<-merge(x=honors_students,y=Q4_Attendance,by=”ID”,all.x=TRUE)"

But I fixed the "" as you mentioned and it worked! Thank you so much!

This topic was automatically closed 21 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.