Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to change levels of group variable in plot_paired_abundances #184

Open
mariamaseng opened this issue Mar 3, 2023 · 0 comments
Open

Comments

@mariamaseng
Copy link

Hi!
I want to plot_paired_abundances, and are successfully able. However, i would like to change the levels of the group (currently they are post-pre, want it to be pre-post). When I do with this code:
sample_data(p_kombucha_agg)$pre_post <- factor(sample_data(p_kombucha_agg)$pre_post, levels=c('pre', 'post'))
it changes from being a character to a factor. Then running the code I get the following error message (which seem unrelated to the actual problem).

_Error in filter():
! Problem while computing ..1 = group == unique(xmeta_lf_2$group)[1].
✖ Input ..1 must be of size 6 or 1, not size 0.
ℹ The error occurred in group 1: taxa = "d__Bacteria;p__Firmicutes;c__Bacilli;o__Bacillales_B;f__Bacillaceae_C;g__Weizmannia", linevar = 2003.
Backtrace:

  1. microbiomeutilities::plot_paired_abundances(...)
  2. dplyr:::filter.data.frame(., group == unique(xmeta_lf_2$group)[1])_

My question; how can I change the levels of my group variable?
Thanks for a great package!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant