i have a DF like so:
row_id stn_1 stn_2 stn_3 stn_4 stn_5
1 1 0 1 0 1
2 0 1 0 0 0
3 1 0 0 0 0
4 1 0 1 0 0
5 0 0 0 1 0
I want to get the percentage of stn's that appeared in the data. basically the percentage of 1's in each column except row_id.
expected output:
stn percentage
stn_1 .60
stn_2 .20
stn_3 .40
stn_4 .20
stn_5 .20
How can I do this in dplyr?