Plot by metric & host order
I ran this command:
to_keep = c('Observed', 'Shannon')
p = ggplot(alpha_div_exp %>% filter(Index %in% to_keep), aes(order, Index_value)) + geom_boxplot() + labs(x='Order', y='Value') + facet_wrap(~ Index, scales='free_y') + theme_bw() + theme(axis.text.x = element_text(angle=45, hjust=1))
options(repr.plot.width=5, repr.plot.height=3)
plot(p)
But an Error in geom_boxplot()
keeps appearing:
Don't know how to automatically pick scale for object of type . Defaulting to continuous.
Error in geom_boxplot()
:
! Problem while computing aesthetics.
Error occurred in the 1st layer.
Caused by error in compute_aesthetics()
:
! Aesthetics are not valid data columns.
The following aesthetics are invalid:
x = order
Did you mistype the name of a data column or forget to add
after_stat()
?
Traceback:
- plot(p)
- plot.ggplot(p)..
...23. signal_abort(cnd, .file) lasts long.
Command attached in the photo was used before the #plot by metric & host order step
Can you please help me how can I solve this problem? What cause this Error?
Thank you in advance!