I have a large dataset of samples with descriptors of whether the sample is viable - it looks (kind of) like this, where \'desc\' is the description column and \'blank\' ind
This should work. Though honestly, if the data is unusable, why not delete the rows altogether?
library(dplyr) blanks = dat %>% filter(desc == "blank") %>% select(desc) dat %>% filter(desc == "sample") %>% bind_rows(blanks)