R/randomf_lollipop_plot.R
randomf_lollipop_plot.RdGenerate a Lollipop plot from random forest results
randomf_lollipop_plot(
table,
metadata,
top_n = 15,
size = 8,
variable_to_predict,
col_palette = NULL,
legend_figure = NULL
)Data frame where columns are samples and rows are ASVs or taxa.
Data frame containing sample metadata.
Number of top features to plot (default = 15).
the size of the point of the lollipop.
Variable to predict from the metadata.
Custom color palette (optional).
Main title for the figure.
A lollipop plot showing top important features from random forest analysis.
randomf_lollipop_plot(table= table_taxa3,
metadata= metadata %>% drop_na(),
variable_to_predict = "SITIO",
col_palette = c("red", "blue", "green"),
top_n = 20,
size = 6)
#> Error: object 'table_taxa3' not found
randomf_lollipop_plot(table = otu_table,
metadata = sample_metadata,
variable_to_predict = "season",
legend_figure = "Top important features (Random Forest)")
#> Error: object 'otu_table' not found