I have some count data as seen below. If I run summary(x)
, this gives me column data.
x
line_796 line_799 line_801 line_812 line_884 line_892 line_908
0 0 - 0 0 0 2
0 - 0 0 0 2 0
0 0 0 0 0 2 0
summary(x)
line_796 line_799 line_801 line_812 line_884 line_892 line_908
-:0 -:1 -:1 -:0 -:0 -:0 -:0
0:3 0:2 0:2 0:3 0:3 0:1 0:2
2:0 2:0 2:0 2:0 2:0 2:2 2:1
How would I do this for rows to get the output below?
1 -:1, 0: 5, 2:1
2 -:1, 0: 5, 2:1
3 -:0, 0: 6, 2:1