Open restivve opened 5 years ago
I made the changes in the phyloseq object
Check the order of the metadata (example: "Description" column)
sample_data(PHY_OBJ)$Description
then change the names: sample_data(PHY_OBJ)$Description <- c("newname-7", "newname-16", "newname-40", "newname-35")
And the make the plot, analyses, etc, with the new label !!!!
I hope it help !!!
Hi,
Thank you for the help! When I did sample_data(phy_obj)$Site (site is what I want to re-label and order), I get the sites in order for each of the samples (so they are listed many times, more than just my 10 sites). If I continue with your code, it errors because its trying to relabel the first 10 samples (because I have 10 sites), but I have 150 samples and I don't want to have to copy this 150 times. Is there an easier way?
Victoria
Hi,
I've plotted bray-cutis beta diversity (PCoA) and need to change the labels. I've done this for other plots in ggplot using a code like this:
Unfortunately this doesn't work with the phyloseq function plot_ordinate.
I'm looking for a way to change the labels of the sites on the legend, please advise!
BrayCurtis_ChangeLegendLabels.pdf !