From e51ead6c9e881bcede21470fa47bee36a1d86a8a Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Tue, 7 Feb 2023 10:35:12 -0600 Subject: [PATCH] Tweak code formatting --- EDA.qmd | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/EDA.qmd b/EDA.qmd index 258bcbd..4825608 100644 --- a/EDA.qmd +++ b/EDA.qmd @@ -457,8 +457,7 @@ To make the trend easier to see, we can reorder `class` based on the median valu #| on the x-axis and ordered by increasing median highway mileage (pickup, #| suv, minivan, 2seater, subcompact, compact, and midsize). -ggplot(mpg, - aes(x = fct_reorder(class, hwy, median), y = hwy)) + +ggplot(mpg, aes(x = fct_reorder(class, hwy, median), y = hwy)) + geom_boxplot() ``` @@ -470,8 +469,7 @@ You can do that by exchanging the x and y aesthetic mappings. #| Side-by-side boxplots of highway mileages of cars by class. Classes are #| on the y-axis and ordered by increasing median highway mileage. -ggplot(mpg, - aes(x = hwy, y = fct_reorder(class, hwy, median))) + +ggplot(mpg, aes(x = hwy, y = fct_reorder(class, hwy, median))) + geom_boxplot() ```