Thanks thats much simpler and more elegant. I have a follow up if you wouldn't mind:
How would I subset a list of genes based on the same criteria? I tried:
subset(object, features = gene.list > 0)
And got an error here:
Error: Under current subsetting parameters, the default assay will be removed. Please adjust subsetting parameters or change default assay.
I tried subsetting out the count matrix like this:
then running:
Subset <- data.frame[, "A" >= 4]and it returned all values
I also tried
Subset <- data.frame[, data.frame$"A" >= 4]I found a solution if anyone has interest. Take the data out of the object first as a data frame (df) then: