#reorder levels within Genotype
new_data <- table_x_reorder(data_t_pratio,
xcol = "Genotype",
OrderX = c("KO", "WT"))
#compare
plot_scatterbox(data_t_pratio,
Genotype,
Cytokine)
#with
plot_scatterbox(new_data,
Genotype,
Cytokine)
#also works within the plot call
plot_scatterbox(data = table_x_reorder(data_t_pratio,
xcol = "Genotype",
OrderX = c("KO", "WT")),
xcol = Genotype,
ycol = Cytokine)
Run the code above in your browser using DataLab