I am beginning with R. I am testing with a dataset called "students". Its a matrix with the name of the student and their classification (A, B, C) on several subjects (Vars). I would like to filter the name and list the subject(s) when the subject has a value "B" or "C". Please see what I have and what I would like to get.
Thank you for your help
What I have...
Name    MATH    LANG    GYMN    LIT SOC
Nigel   A   B   C   A   C
John    C   C   A   B   C
Martha  A   A   A   A   A
I wish...
Nigel   
LANG 
GYMN
SOC
John
MATH
LANG
LIT
SOC
 
    