--- title: "Diamond sizes" date: 2023-01-13 author: "Meijing Liang" output: pdf_document --- ```{r setup, include = TRUE} library(ggplot2) library(dplyr) ``` ```{r include = TRUE, message = FALSE} library(ggplot2) library(dplyr) ``` ```{r} #head(diamonds) smaller <- diamonds %>% filter(carat <= 2) ``` We have data about `r nrow(diamonds)` diamonds. Only `r nrow(diamonds) - nrow(smaller)` are larger than 2 carats. The distribution of the remainder is shown below: ```{r, echo = FALSE} smaller %>% ggplot(aes(carat)) + geom_freqpoly(binwidth = 0.01) ```