ChiLiubio / microeco

An R package for data analysis in microbial community ecology
GNU General Public License v3.0
195 stars 56 forks source link

Error in reproducing the relative abundance figure #342

Closed srisvs33 closed 6 months ago

srisvs33 commented 6 months ago

Dear team

Thank you for this wonderful package. I am trying to reproduce the relative abundance figure, which shows both phylum and class level, using the code given in the tutorial.

data(dataset)

sum others in each phylum

test1 <- trans_abund$new(dataset = dataset, taxrank = "Class", ntaxa = 20, show = 0, high_level = "Phylum", high_level_fix_nsub = 3, prefix = "\|") test1$plot_bar(ggnested = TRUE, high_level_add_other = TRUE, xtext_angle = 30, facet = c("Group", "Type"))

However, I got the following error. Error in data.frame(group = groups, group_colour = clr_pal[1:n_clrs]) : arguments imply differing number of rows: 0, 1

Could you please let me know, how I can solve the issues?

Many thanks in advance

Venkat

ChiLiubio commented 6 months ago

Hi Venkat,

Thanks. There is another same topic just now (https://github.com/ChiLiubio/microeco/issues/341). But the user has not replied it, I cannot judge the specific package issue. I guess the reason that I can run it successfully may be I reinstalled all the packages when I release v1.5.0. So please reinstall all the packages to avoid packages version compatability and try again.

Best Chi

srisvs33 commented 6 months ago

Hi Chi

Thank you for your info. I will try to reinstall all the packages and see again

regards Venkat