Entering edit mode
4.4 years ago
dpc
▴
250
Hi I have converted my data into phyloseq object for statistical analysis. From the sample_data object I want to select two specific columns which I will further combine with a distance matrix. But, I am unable to extract out those two columns. I am using these codes which is reversing the following error:
My code:
sd = as.matrix(sample_data(physeq))
sd = sd %>%
select("SampleID", "type") %>%
mutate_if(is.factor,as.character)
Error reversed:
Error in UseMethod("select_") :
no applicable method for 'select_' applied to an object of class "c('matrix', 'array', 'character')"
How should I do the step?
Thanks dpc
try.