The second argument to car::Boxplot is 'g' for use as a grouping variable. At the moment we cannot tell what your dataframe looks like and it sounds as though it might not be in the long format which Boxplot expects. If there were a single column say "area_type" that had values of "ski_parc" and "snow_parc" you could use this format:
Boxplot( ~ km_piste, g= area_type, data=slide, id.method="y", col=c("orange", "red") )
The use of na.omit
had nothing to do with the labeling of the points. It was the choice to use id.method="y"
. When there are multiple groups the x-axis gets labeled with their levels.
Try this:
snow_parc <- data.frame(parc =c(slides$snow_parc, slides$ski_parc),
type=rep(c("snow_parc", "ski_parc"), each=40))
Boxplot(parc~type, data=snow_parc, id.method = "y")
(There were no outliers.)