Dplyr collect from databases (solution)

Exercise
Output solution

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
Warning: `src_sqlite()` was deprecated in dplyr 1.0.0.
ℹ Please use `tbl()` directly with a database connection
[1] 25
Warning: Missing values are always removed in SQL aggregation functions.
Use `na.rm = TRUE` to silence this warning
This warning is displayed once every 8 hours.
# A tibble: 1 × 1
  avg_weight
       <dbl>
1      0.159
# A tibble: 26 × 2
    year no_individuals
   <int>          <int>
 1  1977            503
 2  1978           1048
 3  1979            719
 4  1980           1415
 5  1981           1472
 6  1982           1978
 7  1983           1673
 8  1984            981
 9  1985           1438
10  1986            942
# ℹ 16 more rows