I am trying to Boxplot my data frame using this command.
ggplot(combined_data,aes(x= factor(field), y=moisture1))+geom_boxplot()
How can I remove the outliers from the output of this command ?
If you just want to remove the outliers from your graph, you can just add the argument outlier.shape = NA to geom_boxplot()
outlier.shape = NA
geom_boxplot()
Example:
require(tidyverse) mtcars %>% ggplot(aes(1, wt)) + geom_boxplot(outlier.shape = NA)