How to remove columns and rows that sum to 0 while preserving non-numeric columns
问题 Below is a subset of my data. I am trying to remove columns AND rows that sum to 0 ... the catch is that I want to preserve columns 1 to 8 in the resulting output. Any ideas? I've tried quite a few. A tidy solution would be best. Site Date Mon Day Yr Szn SznYr A B C D E F G B0001 7/29/97 7 29 1997 Summer 1997-Summer 0 0 0 0 0 0 0 B0001 7/29/97 7 29 1997 Summer 1997-Summer 0 0 1 0 0 0 0 B0001 7/29/97 7 29 1997 Summer 1997-Summer 0 0 0 3 0 0 0 B0001 7/29/97 7 29 1997 Summer 1997-Summer 0 0 0 0