str_length() and babynames
babynames |>
count(length = str_length(name), wt = n)
## # A tibble: 14 × 2
## length n
## <int> <int>
## 1 2 338150
## 2 3 8589596
## 3 4 48506739
## 4 5 87011607
## 5 6 90749404
## 6 7 72120767
## 7 8 25404066
## 8 9 11926551
## 9 10 1306159
## 10 11 2135827
## 11 12 16295
## 12 13 10845
## 13 14 3681
## 14 15 830