I am trying to remove samples from my otu_table
in a phyloseq object ps
. This is so I can match the samples in my sample_data
(which does not have the samples stated below as I removed them due to NAs). I'm using this:
enter code hereto_remove <- c("Sample1", "Sample5", "Sample10", "Sample30")
# using z first to see if it works
z <- prune_samples(ps@otu_table, !(sample_names() %in% to_remove))
but get this error:
# Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘prune_samples’ for signature ‘"otu_table", "logical"’
How do I go about removing samples from my otu_table
?
My bad, didn't notice that i entered the arguments in the wrong order. Also should put in the phyloseq object for
sample_names()
. Thank you!