In a dataframe, I only want to keep rows that have at least one variables starting with DSDECOD is NOT empty. How can I do that?
it seems that following code works.
ds_sub <- subset(ds_supp, (DSDECOD1 !="" | DSDECOD2 !="" |
DSDECOD3 !="" | DSDECOD4 !=""))
But is there simple way so that I don't have to write out all of the variables starting with DSDECOD?