I am new to R and trying to create a new data frame ("B") from an existing data frame ("A") by participant ID/observation number. I have tried using the subset function and it doesn't seem to be recognizing that I want rows of data, not columns. The subset I am looking for does not necessarily follow any logic (a subset of participants consented to an additional component of the study).
What I tried:
B <- subset.data.frame(A, A$ParticipantID == "1", "7", "10", )
B <- subset(A[A$participantID == 1, 7, 10])
And just about every variation of this code I was able to think of given the examples I've seen. Thanks in advance!