У меня есть функция, определенная на данный момент следующим образом:
gam_select <- function(dependent, scope_list, data, family){
nrun <- length(scope_list[[1]]) * length(scope_list[[2]]) *
length(scope_list[[3]]) * length(scope_list[[4]]) * length(scope_list[[5]]) *
length(scope_list[[6]])*length(scope_list[[7]])
ptm <- proc.time()
all.gams <- data.frame(aic_val = rep(9999, nrun+1))
counter = 0
for(i in 1:length(scope_list[[1]])){
for(j in 1:length(scope_list[[2]])){
for(k in 1:length(scope_list[[3]])){
for(l in 1:length(scope_list[[4]])){
for(m in 1:length(scope_list[[5]])){
for(n in 1:length(scope_list[[6]])){
for(o in 1:length(scope_list[[7]])){
counter = counter+1
form.test <- paste0(dependent," ~ ",
scope_list[[1]][i], " + ",
scope_list[[2]][j], " + ",
scope_list[[3]][k], " + ",
scope_list[[4]][l] ," + ",
scope_list[[5]][m], " + ",
scope_list[[6]][n], " + ",
scope_list[[7]][o])
gam.test <- mgcv::gam(as.formula(form.test), data = data, family = family)
all.gams$formula[counter] <- form.test
all.gams$aic_val[counter] <- MuMIn::AICc(gam.test)
all.gams$bic_val[counter] <- BIC(gam.test)
print(paste(counter,"/",nrun, " ", form.test))
}
}
}
}
}
}
}
all.gams$formula[all.gams$aic_val == min(all.gams$aic_val)]
best_aic <- as.numeric(rownames(all.gams[all.gams$aic_val == min(all.gams$aic_val),]))
print(paste(all.gams[best_aic,]))
return(all.gams)
}
Эта функция работает нормально, но, как вы можете, вероятно, заметить, минимальные изменения (т.е. увеличение длины списка) области видимости могут значительно замедлиться функция.
Я хотел бы сделать это параллельно, если смогу, порядок не имеет значения, пока на выходе есть data.frame, который представляет все формулы гаммы с их AI C ценность. Сторона: Кто-то может спросить, почему бы не использовать для этого пошаговую программу AI C, краткий ответ: пошаговые функции действительно не ищут полный список областей.
Я попробовал несколько методов, но, похоже, он не проходил каждую итерацию, он останавливался на первой:
all.gams <- foreach (i = 1:length(scope_list[[1]]),
j = 1:length(scope_list[[2]]),
k = 1:length(scope_list[[3]]),
l = 1:length(scope_list[[4]]),
m = 1:length(scope_list[[5]]),
n = 1:length(scope_list[[6]]),
o = 1:length(scope_list[[7]]), combine = 'cbind', .inorder = F) %dopar% {
counter = counter+1
form.test <- paste0(dependent," ~ ",
scope_list[[1]][i], " + ",
scope_list[[2]][j], " + ",
scope_list[[3]][k], " + ",
scope_list[[4]][l] ," + ",
scope_list[[5]][m], " + ",
scope_list[[6]][n], " + ",
scope_list[[7]][o])
gam.test <- mgcv::gam(as.formula(form.test), data = data, family = family)
all.gams$formula[counter] <- form.test
all.gams$aic_val[counter] <- MuMIn::AICc(gam.test)
print(paste(counter,"/",nrun, " ", form.test))
return(all.gams)
}
и
all.gams <- foreach (i = 1:length(scope_list[[1]]), combine = 'cbind', .inorder = F) %:%
foreach (j = 1:length(scope_list[[2]]), combine = 'cbind', .inorder = F) %:%
foreach (k = 1:length(scope_list[[3]]), combine = 'cbind', .inorder = F) %:%
foreach (l = 1:length(scope_list[[4]]), combine = 'cbind', .inorder = F) %:%
foreach (m = 1:length(scope_list[[5]]), combine = 'cbind', .inorder = F) %:%
foreach (n = 1:length(scope_list[[6]]), combine = 'cbind', .inorder = F) %:%
foreach (o = 1:length(scope_list[[7]]), combine = 'cbind', .inorder = F) %dopar% {
counter = counter+1
form.test <- paste0(dependent," ~ ",
scope_list[[1]][i], " + ",
scope_list[[2]][j], " + ",
scope_list[[3]][k], " + ",
scope_list[[4]][l] ," + ",
scope_list[[5]][m], " + ",
scope_list[[6]][n], " + ",
scope_list[[7]][o])
gam.test <- mgcv::gam(as.formula(form.test), data = data, family = family)
all.gams$formula[counter] <- form.test
all.gams$aic_val[counter] <- MuMIn::AICc(gam.test)
print(paste(counter,"/",nrun, " ", form.test))
return(all.gams)
}
Вот список scope_list:
scope_list <- list(
TagID = c("s(TagID, bs = 're')"),
mwoy = c( "1", "mwoy", "s(mwoy, bs = 'cs',k = 5)"),
EstimatedAge = c("1", "EstimatedAge", "s(EstimatedAge, bs = 'cs',k = 5)"),
Avg_Flow= c("1", "Avg_Flow", "s(Avg_Flow, bs = 'cs',k = 5)"),
Avg_Temperature= c("1 ", " Avg_Temperature ", " s(Avg_Temperature, bs = 'cs',k = 3)"),
Avg_Turbidity= c("1 ", " Avg_Turbidity ", " s(Avg_Turbidity, bs = 'cs',k = 5)"),
Avg_TDS= c("1 ", " Avg_TDS", " s(Avg_TDS, bs = 'cs', k = 5)"),
n_Salmonids= c("1 ", " n_Salmonids ", " s(n_Salmonids, bs = 'cs',k = 5)")
)
наконец, вот как я бы назвал эту функцию: entry <- gam_select("entry", scope_list, weekly_stb_gam, binomial())
и некоторые данные для воспроизведения:
structure(list(Species = structure(c(3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("Catfish",
"Largemouth Bass", "Striped Bass"), class = "factor"), EstimatedAge = c(3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2), TagID = c(5004.24,
5004.24, 5004.24, 5004.24, 5004.24, 5004.24, 5004.24, 5004.24,
5004.24, 5004.24, 5004.24, 5004.24, 5004.24, 5004.24, 5004.24,
5004.24, 5004.24, 5004.24, 5004.24, 5004.24, 5004.24, 5004.24,
5004.24, 5004.24, 5004.24, 5004.24, 5004.24, 5004.24, 5004.24,
5004.24, 5004.24, 5004.24, 5004.24, 5004.24, 5004.24, 5004.24,
5004.24, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03,
5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03,
5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03,
5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03,
5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03,
5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03,
5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03,
5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03,
5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03, 5011.03,
5011.03), Week = c(74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 164, 165, 166,
167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
219, 220, 221, 222, 223, 224, 225, 226), transit = c(0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), exit = c(0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), entry = c(0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Avg_Flow = c(2001.28571428571,
648.285714285714, 290.571428571429, 291.571428571429, 290.285714285714,
1003.28571428571, 1288.42857142857, 2243.28571428571, 3107.42857142857,
3488.85714285714, 5468.14285714286, 5070.28571428571, 3079.71428571429,
3346.85714285714, 3369.14285714286, 4855.71428571429, 3861.42857142857,
3773.71428571429, 2534.28571428571, 4373.85714285714, 4994.57142857143,
3556.28571428571, 3874.14285714286, 1369.14285714286, 644.857142857143,
540.428571428571, 538.857142857143, 536.714285714286, 506.857142857143,
533.142857142857, 663.571428571429, 316.857142857143, 326.714285714286,
535.285714285714, 946.714285714286, 606.285714285714, 402.857142857143,
4135.85714285714, 3296.42857142857, 6417.85714285714, 7159.28571428571,
3200.28571428571, 6569.71428571429, 6975, 6374.57142857143, 7077,
7172.42857142857, 7171.28571428571, 7167.57142857143, 4707.71428571429,
6062.28571428571, 4204.42857142857, 2992.57142857143, 2489.85714285714,
2170.28571428571, 2852.14285714286, 4984.85714285714, 5823, 2992.14285714286,
4081, 6673, 6337, 6247.57142857143, 3637.57142857143, 3489.85714285714,
3207.85714285714, 5407.14285714286, 9413.42857142857, 10106.7142857143,
10234, 10240, 9745.85714285714, 3753.71428571429, 3502, 1728.28571428571,
1336.57142857143, 0, 0, 0, 0, 1471.57142857143, 2488.42857142857,
5209, 6673.71428571429, 4270, 2421.14285714286, 2560.71428571429,
6648.42857142857, 6670.85714285714, 6671, 6669.57142857143, 6281.85714285714,
5545.57142857143, 7102.57142857143, 7173.85714285714, 7125.28571428571,
7165.85714285714, 7069.71428571429, 7171.42857142857, 7138.14285714286
), Avg_Wind = c(9.33333333333333, 4.57142857142857, 8.14285714285714,
5.71428571428571, 5.42857142857143, 6, 4.14285714285714, 5.42857142857143,
4, 5.85714285714286, 4.85714285714286, 5.71428571428571, 8.14285714285714,
9.14285714285714, 2.42857142857143, 2.71428571428571, 3.14285714285714,
3.85714285714286, 4, 7.28571428571429, 4, 8, 7.42857142857143,
4.28571428571429, 6.28571428571429, 8.42857142857143, 11.5714285714286,
9, 11, 11.1428571428571, 12.8571428571429, 13.2857142857143,
13.7142857142857, 19.2857142857143, 16, 13.1428571428571, 8.85714285714286,
12.7142857142857, 10.8571428571429, 13, 12.8571428571429, 13.1428571428571,
7.28571428571429, 9.28571428571429, 10.1428571428571, 7, 8.71428571428571,
12.4285714285714, 10.5714285714286, 9.71428571428571, 8.85714285714286,
6.14285714285714, 12.1428571428571, 6.57142857142857, 7, 3.42857142857143,
4, 2.14285714285714, 5.28571428571429, 4.85714285714286, 8.28571428571429,
8.14285714285714, 4.57142857142857, 6.14285714285714, 6.57142857142857,
8.71428571428571, 10.5714285714286, 6.28571428571429, 8.57142857142857,
4.71428571428571, 7.16666666666667, 5.57142857142857, 12.2857142857143,
6.14285714285714, 6.57142857142857, 4.71428571428571, 7.14285714285714,
11.1428571428571, 8.85714285714286, 9.42857142857143, 6.57142857142857,
13.5714285714286, 11.4285714285714, 12.8571428571429, 14.2857142857143,
8.42857142857143, 14.7142857142857, 11.7142857142857, 12.5714285714286,
9.85714285714286, 15, 11.5714285714286, 10, 11.8571428571429,
8.14285714285714, 8.42857142857143, 13.4285714285714, 13.8571428571429,
10, 6.57142857142857), Avg_Conductivity = c(569, 610.428571428571,
637.428571428571, 651.857142857143, 688.428571428571, 661, 636.142857142857,
689.428571428571, 672.285714285714, 617.428571428571, 591.714285714286,
629.571428571429, 741.571428571429, 662.428571428571, 535.285714285714,
551.571428571429, 473.142857142857, 464.285714285714, 489.428571428571,
590, 557.285714285714, 572.142857142857, 454.428571428571, 420.714285714286,
450.428571428571, 498.857142857143, 588.142857142857, 482.142857142857,
511.285714285714, 513.857142857143, 536.285714285714, 598.714285714286,
680.714285714286, 767, 821.285714285714, 813.428571428571, 835.285714285714,
290.142857142857, 284, 295.857142857143, 276, 280.714285714286,
271.142857142857, 257.428571428571, 297.142857142857, 311, 327.285714285714,
375, 414.142857142857, 498, 554.285714285714, 544.428571428571,
571.857142857143, 588, 562.571428571429, 560.571428571429, 507,
462.857142857143, 482.428571428571, 588.571428571429, 585.428571428571,
567.428571428571, 610.714285714286, 699, 524.285714285714, 444.857142857143,
342.857142857143, 299.428571428571, 281.571428571429, 242.714285714286,
226.285714285714, 207, 179.142857142857, 184.428571428571, 166.857142857143,
158.285714285714, 139.142857142857, 142.857142857143, 148.142857142857,
141.285714285714, 124.285714285714, 123.428571428571, 125.285714285714,
121.428571428571, 98, 116.857142857143, 128, 140.857142857143,
138.285714285714, 138.857142857143, 109.142857142857, 107.285714285714,
138.142857142857, 155.428571428571, 149.285714285714, 158.428571428571,
180.285714285714, 184.285714285714, 182.714285714286, 190.142857142857
), Avg_pH = c(7.42857142857143, 7.44285714285714, 7.48571428571429,
7.44285714285714, 7.51428571428571, 7.5, 7.45714285714286, 7.44285714285714,
7.5, 7.5, 7.41428571428571, 7.6, 7.58571428571429, 7.7, 7.7,
7.61428571428571, 7.55714285714286, 7.54285714285714, 7.51428571428571,
7.57142857142857, 7.41428571428571, 7.51428571428571, 7.61428571428571,
7.71428571428571, 7.61428571428571, 7.51428571428571, 7.54285714285714,
7.57142857142857, 7.81428571428571, 8.4, 7.68571428571429, 7.58571428571429,
7.7, 7.84285714285714, 7.78571428571429, 7.68571428571429, 7.67142857142857,
7.58571428571429, 7.55714285714286, 7.47142857142857, 7.62857142857143,
7.47142857142857, 7.32857142857143, 7.34285714285714, 7.52857142857143,
7.64285714285714, 7.72857142857143, 7.87142857142857, 7.91428571428571,
7.91428571428571, 7.9, 7.8, 7.82857142857143, 7.81428571428571,
7.8, 7.72857142857143, 7.52857142857143, 7.5, 7.51428571428571,
7.62857142857143, 7.67142857142857, 7.85714285714286, 7.81428571428571,
7.88571428571429, 7.82857142857143, 7.92857142857143, 7.91428571428571,
7.52857142857143, 7.61428571428571, 7.44285714285714, 7.68571428571429,
7.48571428571429, 7.5, 7.52857142857143, 7.6, 7.55714285714286,
7.54285714285714, 7.57142857142857, 7.61428571428571, 7.6, 7.54285714285714,
7.48571428571429, 7.3, 7.34285714285714, 7.58571428571429, 7.55714285714286,
7.58571428571429, 7.6, 7.5, 7.35714285714286, 7.48571428571429,
7.4, 7.54285714285714, 7.57142857142857, 7.55714285714286, 7.55714285714286,
7.8, 7.8, 7.8, 7.85714285714286), Avg_Flourescence = c(109.665714285714,
98.5928571428571, 96.0385714285714, 93.37, 95.0514285714286,
90.9, 96.7657142857143, 100.264285714286, 101.232857142857, 80.0242857142857,
73.8085714285714, 70.5685714285714, 79.9571428571429, 84.5257142857143,
90.8442857142857, 82.9971428571428, 83.6971428571429, 83.4871428571429,
84.1842857142857, 84.5557142857143, 88.3257142857143, 88.9857142857143,
94.6928571428571, 96.51, 96.1185714285714, 95.7128571428571,
86.0571428571428, 84.8957142857143, 281.365714285714, 455.407142857143,
130.278571428571, 90.2957142857143, 90.8657142857143, 99.1642857142857,
83.8957142857143, 81.9971428571429, 78.8128571428571, 93.7585714285714,
97.1857142857143, 110.777142857143, 110.71, 101.081428571429,
98.2857142857143, 91.4285714285714, 85.5671428571429, 83.8628571428571,
79.1071428571429, 74.7871428571429, 71.4485714285714, 79.2642857142857,
68.1442857142857, 74.9485714285714, 83.6857142857143, 59.42,
60.49, 65.31, 61.5114285714286, 58.63, 62.9671428571429, 62.9614285714286,
59.6214285714286, 60.8528571428571, 60.5142857142857, 56.52,
58.1714285714286, 61.7057142857143, 70.1157142857143, 95.2528571428571,
102.661428571429, 85.2157142857143, 84.6642857142857, 103.77,
90.5628571428571, 77.2414285714286, 75.5028571428571, 76.53,
69.2514285714286, 67.6314285714286, 74.49, 69.9857142857143,
73.2771428571429, 72.0171428571429, 70.4785714285714, 75.9371428571429,
70.5014285714286, 63.25, 74.7842857142857, NaN, 105.005714285714,
100.607142857143, 112.18, 111.237142857143, 113.255714285714,
111.084285714286, 124.067142857143, 103.008571428571, 113.164285714286,
110.241428571429, 110.295714285714, 96.9785714285714), Avg_Temperature = c(22.8285714285714,
22.7714285714286, 22.1, 20.6142857142857, 19.1, 17.5142857142857,
17.1571428571429, 16.1571428571429, 14.5, 13.8428571428571, 14.5571428571429,
12.9428571428571, 12.8857142857143, 10.6428571428571, 8.78571428571429,
10.1571428571429, 10.6142857142857, 10.8571428571429, 11.8285714285714,
13.6, 14.9142857142857, 14.7571428571429, 14.6428571428571, 16.4285714285714,
18.5142857142857, 19.1428571428571, 20.0285714285714, 18.0571428571429,
18.8428571428571, 20.1571428571429, 20.5428571428571, 21.5571428571429,
20.1571428571429, 19.4285714285714, 20.6571428571429, 22.5, 24.3714285714286,
23.0142857142857, 24.8, 25.0857142857143, 24.2285714285714, 24.4571428571429,
25.3714285714286, 25.3857142857143, 24.3857142857143, 24.7, 23.7571428571429,
22.4857142857143, 22.6428571428571, 22.3142857142857, 22.2571428571429,
21.8285714285714, 20.1428571428571, 19.4142857142857, 18.8, 18.6285714285714,
18.1714285714286, 17.8714285714286, 17.7142857142857, 15.3428571428571,
13.4571428571429, 11.4142857142857, 11.6428571428571, 10.8285714285714,
9.57142857142857, 9.25714285714286, 10.6285714285714, 10.6714285714286,
10.4714285714286, 10.7428571428571, 12.5714285714286, 13.2285714285714,
12.6571428571429, 12.3857142857143, 12.8714285714286, 15.3714285714286,
15.9142857142857, 14.9285714285714, 15.8714285714286, 15.0428571428571,
15.4714285714286, 16.4714285714286, 17.9428571428571, 18.6428571428571,
16.6142857142857, 18.3, 18.6571428571429, 20.1428571428571, 20.2714285714286,
24.1142857142857, 23.7857142857143, 23.5857142857143, 24.6571428571429,
25.9571428571429, 25.6714285714286, 25.9571428571429, 24.1857142857143,
23.7, 23.2571428571429, 23.6142857142857), Avg_Turbidity = c(6.42428571428571,
4.91428571428571, 4.51142857142857, 3.93, 3.47571428571429, 3.69142857142857,
4.21857142857143, 4.32857142857143, 4.69428571428571, 5.19285714285714,
5.99857142857143, 14.2128571428571, 11.9871428571429, 10.8742857142857,
17.0657142857143, 11.8457142857143, 10.71, 8.25, 6.77285714285714,
6.58285714285714, 6.54, 6.87571428571429, 8.56, 7.46571428571429,
6.71285714285714, 7.14714285714286, 6.28142857142857, 6.20571428571429,
8.248, NaN, 16.71, 12.8171428571429, 8.67, 8.87571428571428,
7.17285714285714, 7.26285714285714, 6.64571428571429, 10.5885714285714,
8.97142857142857, 11.4442857142857, 11.0457142857143, 24.9557142857143,
11.02, 8.63285714285714, 8.62571428571429, 9.84714285714286,
9.91714285714286, 8.31571428571429, 7.93142857142857, 6.55428571428571,
7.63571428571429, 6.16, 5.9, 4.66142857142857, 5.00857142857143,
4.68714285714286, 5.26714285714286, 5.86142857142857, 5.02142857142857,
5.44714285714286, 4.95285714285714, 5.73714285714286, 6.54285714285714,
6.65285714285714, 7.70571428571429, 11.65, 22.3928571428571,
53.1457142857143, 67.5757142857143, 37.7942857142857, 27.8814285714286,
52.6671428571429, 66.5185714285714, 47.0714285714286, 32.6957142857143,
23.9042857142857, 17.6128571428571, 18.7814285714286, 15.2457142857143,
12.7328571428571, 14.0857142857143, 14.19, 15.0828571428571,
16.9657142857143, 17.5985714285714, 16.6657142857143, 20.7014285714286,
25.5228571428571, 24.8, 19.8942857142857, 26.1514285714286, 28.9985714285714,
26.48, 21.6671428571429, 22.9442857142857, 15.65, 14.9228571428571,
12.6314285714286, 27.3671428571429, 10.9428571428571), Avg_TDS = c(284.5,
305.214285714286, 318.714285714286, 325.928571428571, 344.214285714286,
330.5, 318.071428571429, 344.714285714286, 336.142857142857,
308.714285714286, 295.857142857143, 314.785714285714, 370.785714285714,
331.214285714286, 267.642857142857, 275.785714285714, 236.571428571429,
232.142857142857, 244.714285714286, 295, 278.642857142857, 286.071428571429,
227.214285714286, 210.357142857143, 225.214285714286, 249.428571428571,
294.071428571429, 241.071428571429, 255.642857142857, 256.928571428571,
268.142857142857, 299.357142857143, 340.357142857143, 383.5,
410.642857142857, 406.714285714286, 417.642857142857, 145.071428571429,
142, 147.928571428571, 138, 140.357142857143, 135.571428571429,
128.714285714286, 148.571428571429, 155.5, 163.642857142857,
187.5, 207.071428571429, 249, 277.142857142857, 272.214285714286,
285.928571428571, 294, 281.285714285714, 280.285714285714, 253.5,
231.428571428571, 241.214285714286, 294.285714285714, 292.714285714286,
283.714285714286, 305.357142857143, 349.5, 262.142857142857,
222.428571428571, 171.428571428571, 149.714285714286, 140.785714285714,
121.357142857143, 113.142857142857, 103.5, 89.5714285714286,
92.2142857142857, 83.4285714285714, 79.1428571428571, 69.5714285714286,
71.4285714285714, 74.0714285714286, 70.6428571428571, 62.1428571428571,
61.7142857142857, 62.6428571428571, 60.7142857142857, 49, 58.4285714285714,
64, 70.4285714285714, 69.1428571428571, 69.4285714285714, 54.5714285714286,
53.6428571428571, 69.0714285714286, 77.7142857142857, 74.6428571428571,
79.2142857142857, 90.1428571428571, 92.1428571428571, 91.3571428571429,
95.0714285714286), Chinook = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 22, 22, 9, 3, 2, 3, 0, 1, 0, 1, 3, 0, 1, 0, 0, 4, 3, 0, 5,
3, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 1, 0, 1, 5, 8, 4, 107, 71, 32, 217, 581, 530,
627, 198, 548, 75, 41, 5, 8, 31, 166, 175, 480, 534, 1116, 1462,
1433, 1421, 783, 831, 1165, 654, 182, 41, 12, 1, 3, 0, 0, 0,
0, 1, 0), DeltaSmelt = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 5, 0, 1, 1,
6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0), Threadfin = c(1862, 1837, 94, 200, 417, 135, 167,
354, 1085, 343, 421, 1790, 638, 459, 369, 129, 29, 25, 5, 35,
10, 1, 15, 18, 11, 1, 0, 0, 1, 17, 5, 10, 7, 0, 5, 131, 2265,
19085, 23944, 30359, 58128, 16975, 88344, 139973, 48927, 43486,
43579, 26303, 10583, 2062, 2780, 1498, 342, 245, 79, 6173, 1287,
435, 28, 281, 511, 657, 262, 943, 305, 442, 970, 963, 555, 380,
261, 121, 32, 19, 35, 113, 62, 48, 52, 116, 174, 233, 152, 71,
44, 27, 42, 235, 454, 3713, 14463, 42205, 27640, 24824, 11934,
30972, 41203, 77515, 36054, 14975), Steelhead = c(0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 1, 4, 33, 42, 45, 15,
7, 0, 3, 4, 4, 3, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2,
0, 1, 1, 1, 3, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 2, 3, 0,
3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), woy = c(39L, 40L, 41L,
42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 1L, 2L,
3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L,
17L, 18L, 19L, 20L, 21L, 22L, 23L, 25L, 26L, 27L, 28L, 29L, 30L,
31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L,
44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 1L, 2L, 3L,
4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L,
18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L,
31L, 32L, 33L, 34L), mwoy = c(52, 53, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47), n_Salmonids = c(0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 22, 22, 9, 3, 2, 3, 6, 2, 4, 34, 45,
45, 16, 7, 0, 7, 7, 4, 8, 4, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 6, 8, 4,
107, 71, 34, 217, 582, 531, 628, 201, 556, 75, 41, 5, 8, 31,
166, 175, 480, 534, 1117, 1462, 1436, 1423, 786, 831, 1168, 654,
183, 41, 12, 1, 3, 0, 0, 0, 0, 1, 0)), class = c("tbl_df", "tbl",
"data.frame"), row.names = c(NA, -100L))