Filter data to keep only rows where cameras are in both tables
Value
A list of two dataframes with filtered values:
$recordsis the records dataframe$camerasis the cameras dataframe
Examples
dfrec <- data.frame(species = c("pigeon", "mouse", "pigeon", "mouse"),
                      stamp = Sys.time() + seq(60, length.out = 4, by = 60),
                      camera = c("A", "B", "C", "E"))
dfcam <- data.frame(camera = c("A", "B", "C", "D"), 
                      lat = c(20.12, 20.22, 22.34, 21.35),
                      lon = c(33.44, 33.45, 33.42, 33.53))
filter_cameras_in_both_tables(dfrec, dfcam, 
                              cam_col_dfrec = "camera")
#> $records
#>   species               stamp camera
#> 1  pigeon 2025-02-17 14:20:56      A
#> 2   mouse 2025-02-17 14:21:56      B
#> 3  pigeon 2025-02-17 14:22:56      C
#> 
#> $cameras
#>   camera   lat   lon
#> 1      A 20.12 33.44
#> 2      B 20.22 33.45
#> 3      C 22.34 33.42
#> 
