I have a data frame A and a vector b.
I want to eliminate any columns in A with indices that are in b by doing A[,-b]
Sometimes vector b has length 0. In this case I would like the whole of data frame A to be returned. Instead I get this error:
data frame with 0 columns and 1259 rows
How can I make sure this doesn't happen in this case?