Dplyr link to 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
# Source:   SQL [?? x 4]
# Database: sqlite 3.46.0 [/home/runner/work/dcsem-solutions/dcsem-solutions/data/portal_mammals.sqlite]
    year month   day species_id
   <int> <int> <int> <chr>     
 1  1977     7    16 NL        
 2  1977     7    16 NL        
 3  1977     7    16 DM        
 4  1977     7    16 DM        
 5  1977     7    16 DM        
 6  1977     7    16 PF        
 7  1977     7    16 PE        
 8  1977     7    16 DM        
 9  1977     7    16 DM        
10  1977     7    16 PF        
# ℹ more rows
# Source:   SQL [?? x 3]
# Database: sqlite 3.46.0 [/home/runner/work/dcsem-solutions/dcsem-solutions/data/portal_mammals.sqlite]
    year species_id weight_kg
   <int> <chr>          <dbl>
 1  1977 DM             0.04 
 2  1977 DM             0.048
 3  1977 DM             0.029
 4  1977 DM             0.046
 5  1977 DM             0.036
 6  1977 DO             0.052
 7  1977 PF             0.008
 8  1977 OX             0.022
 9  1977 DM             0.035
10  1977 PF             0.007
# ℹ more rows
# Source:   SQL [?? x 1]
# Database: sqlite 3.46.0 [/home/runner/work/dcsem-solutions/dcsem-solutions/data/portal_mammals.sqlite]
   species_id
   <chr>     
 1 DM        
 2 DO        
 3 PF        
 4 OX        
 5 PP        
 6 PE        
 7 OT        
 8 OL        
 9 RM        
10 DS        
# ℹ more rows
# Source:   SQL [?? x 1]
# Database: sqlite 3.46.0 [/home/runner/work/dcsem-solutions/dcsem-solutions/data/portal_mammals.sqlite]
   species_id
   <chr>     
 1 DM        
 2 DO        
 3 PF        
 4 OX        
 5 PP        
 6 PE        
 7 OT        
 8 OL        
 9 RM        
10 DS        
# ℹ more rows