Open roopender-bioinfo opened 6 months ago
Hi roopender-bioinfo,
Thank you for reporting this issue with ggpicrust2. It seems like the error is occurring when trying to combine the pathway_class_annotation
and bar_errorbar
ggplot objects into a single plot using the +
operator.
This type of error often occurs when the ggplot2 package is missing a needed extension package for combining plots. In this case, I believe the missing package is patchwork
. Could you please try installing and loading the patchwork package before running your ggpicrust2 code? You can do this with:
install.packages("patchwork")
library(patchwork)
After loading patchwork, please re-run your ggpicrust2 command:
results_file_input <- ggpicrust2(data = ko_abundance,
metadata = metadata,
group = "Environment",
pathway = "KO",
daa_method = "LinDA",
ko_to_kegg = TRUE,
order = "pathway_class",
p_values_bar = TRUE,
x_lab = "pathway_name")
Hopefully this resolves the issue. If you still encounter problems, please let me know and I'll be happy to investigate further.
Best regards, Caffery
Error in object.
Run
ggplot_add()
: ! Can't adde2
to arlang::last_trace()
to see where the error occurred.I just used ggpicrust 2 datasets