Open Hina1112 opened 1 year ago
I think you can treat your factor as an actual R factor. this explains how to reorder factor levels where in this case, phyloseq@sam_data$sampleid would be your factor and your samples would be your levels. if this doesnt work then you will have to extract your plot as a dataframe and then work with it as an R dataframe to reorder them
Thank you so much, i got this.
On Wed, Aug 9, 2023 at 11:51 AM Samuel Degregori @.***> wrote:
I think you can treat your factor as an actual R factor. this explains how to reorder factor levels where in this case, @.***_data$sampleid would be your factor and your samples would be your levels. if this doesnt work then you will have to extract your plot as a dataframe and then work with it as an R dataframe to reorder them
https://www.statology.org/reorder-factor-levels-in-r/
— Reply to this email directly, view it on GitHub https://github.com/joey711/phyloseq/issues/1682#issuecomment-1670576825, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7V27GQEWDBHTEX76CWPSLTXUL3LVANCNFSM6AAAAAAYB5MJW4 . You are receiving this because you authored the thread.Message ID: @.***>
I am making a graph plot from OTU table, when the result came my samples from same group go far apart from each other. LF1,LF2,LF3 and HF1, HF2, HF3.. I want them to be like LF1,LF2.. hf1, hf2, hf3 but it comes out like HF1, LF2, HF2, LF3, LF2, HF3