My data (group) has 300 variables showing which group it belong to in the second row..There are a total of 6 groups
2017 2766 1737 1745 1747 1883 1884 1821 1900 ......
3 4 6 3 3 3 3 3 3 ......
If I do this:
group=="6"
It will show if the variables are true or false if they belong to group 6 as below
2017 2766 1737 1745 1747 1883 1884 1821 1900 ..............
FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE ..............
I am trying to get it list out all the variables which belong to individual group.
For example I want to ask what variables belong to group 6
I tried this but it gave a null results:
names(group=="6")
I then want to save the names into a csv.