Problem with plot_taxa_compiosition function in microbiomeutilites package

18 views Asked by At

I am trying to print a boxplot with plot_taxa_composition in R for an microbiome sequencing experiment. The function works pretty well actually, but I get an error when I try to set the sample.sort argument: "Error in is.null(sample.sort) || sample.sort == "none" : 'length = 3' in coercion to 'logical(1)'" The package help page for that function tells this about the sample.sort argument: sample.sort Order samples. Various criteria are available:

NULL or 'none': No sorting

A single character string: indicate the metadata field to be used for ordering

A character vector: sample IDs indicating the sample ordering.

'neatmap' Order samples based on the neatmap approach. See neatsort. By default, 'NMDS' method with 'bray' distance is used. For other options, arrange the samples manually with the function.""

I have tried to create a vector with the names of the sample in the order I want them to be shown or directly indicate the Sample_data argument in the "physeq" object I use to hold the experiment data, but I always got the same error.

Can someone help me to how use that argument?

0

There are 0 answers