Или с merge
cols <- c('Station.Name', 'Year', 'TMAX')
merge(All.Stations[cols], complete.years, all.x = FALSE)
# Station.Name Year TMAX
#1 GRAND MARAIS 1942 82
#2 LEECH LAKE 1956 72
Данные
All.Stations <- structure(list(Station.Name = c("GRAND MARAIS", "GRAND MARAIS",
"LEECH LAKE", "ALBERT LEA 3 SE", "TWO HARBORS", "ARGYLE"), Year = c(1942L,
1962L, 1956L, 1998L, 1933L, 1922L), Month = c(7L, 3L, 7L, 1L,
5L, 9L), Day = c(28L, 17L, 3L, 25L, 20L, 13L), TMAX = c(82L,
42L, 72L, 25L, 77L, NA), TMIN = c(60L, 22L, 50L, 15L, 42L, NA
)), .Names = c("Station.Name", "Year", "Month", "Day", "TMAX",
"TMIN"), class = "data.frame", row.names = c(NA, -6L))
complete.years <- structure(list(Station.Name = c("DULUTH", "AGASSIZ REFUGE", "LEECH LAKE",
"GRAND MARAIS", "LEECH LAKE"), Year = c(1904L, 1995L, 1956L,
1942L, 1994L)), .Names = c("Station.Name", "Year"), class = "data.frame", row.names = c(NA,
-5L))