#Ethan, Fleming, Philippe, and Sharv

my_data <- read.csv("Astros.csv")


head(my_data)
  Rk Gtm   Date Place Opp  Rslt PA AB  R  H X2B X3B HR RBI BB IBB SO HBP SH SF
1  1   1  7-Apr     @ LAA  W3-1 38 35  3  8   4   0  2   3  3   1 10   0  0  0
2  2   2  8-Apr     @ LAA W13-6 43 40 13 14   3   0  6  13  3   0  8   0  0  0
3  3   3  9-Apr     @ LAA  L0-2 32 29  0  2   0   0  0   0  2   0  5   1  0  0
4  4   4 10-Apr     @ LAA  W4-1 39 34  4  7   1   0  0   3  5   1  6   0  0  0
5  5   5 12-Apr     @ ARI  W2-1 39 34  2  8   2   0  1   2  5   0  2   0  0  0
6  6   6 13-Apr     @ ARI  L2-3 40 34  2  6   0   0  0   2  4   1  8   0  0  2
  ROE GDP SB CS    BA   OBP   SLG   OPS LOB X. Thr Opp..Starter..GmeSc.
1   0   0  1  0 0.229 0.289 0.514 0.804   8  9   R         S.Ohtani(60)
2   0   1  1  0 0.293 0.346 0.707 1.052   3 12   L        R.Detmers(49)
3   1   1  1  0 0.231 0.292 0.529 0.821   5 10   R    N.Syndergaard(63)
4   0   0  0  0 0.225 0.296 0.457 0.753   8  9   L         J.Suarez(49)
5   1   1  0  1 0.227 0.304 0.442 0.746  10  9   L      M.Bumgarner(53)
6   0   1  1  0 0.218 0.294 0.398 0.692   9 11   R          M.Kelly(66)
fit <- lm(R ~ HR, data = my_data)  

summary(fit)

Call:
lm(formula = R ~ HR, data = my_data)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.3288 -1.7608 -0.1927  1.1852 11.6712 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)   2.1927     0.2569   8.535 1.03e-14 ***
HR            1.7840     0.1375  12.979  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.314 on 160 degrees of freedom
Multiple R-squared:  0.5129,    Adjusted R-squared:  0.5098 
F-statistic: 168.5 on 1 and 160 DF,  p-value: < 2.2e-16
# Create a scatter plot with a regression line
plot(my_data$HR, my_data$R, xlab = "Home Runs", ylab = "Runs Scored",
     main = "Comparison of Home Runs to Runs Scored")
abline(fit, col="red")

print("The Slope is positve as more home runs are hit the score also increases")
[1] "The Slope is positve as more home runs are hit the score also increases"
my_data2 <- read.csv("Astros2.csv")
fit_multiple <- lm(R ~ HR + H, data = my_data2)
summary(fit_multiple)

Call:
lm(formula = R ~ HR + H, data = my_data2)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.2452 -1.0665 -0.1324  0.9569  5.2431 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -1.00368    0.32049  -3.132  0.00207 ** 
HR           0.79840    0.14528   5.496 1.52e-07 ***
H            0.51170    0.04419  11.581  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.595 on 159 degrees of freedom
Multiple R-squared:  0.5785,    Adjusted R-squared:  0.5732 
F-statistic: 109.1 on 2 and 159 DF,  p-value: < 2.2e-16
print("correlation")
[1] "correlation"
cor(my_data2$HR, my_data2$H)
[1] 0.2846423
residuals_simple <- residuals(fit)
residuals_multiple <- residuals(fit_multiple)
AIC(fit)
[1] 735.4884
AIC(fit_multiple)
[1] 615.9776
print("Correlation between Variables: The correlation between Home Runs (HR) and Hits (H) is 0.285, suggesting a low to moderate relationship. This low correlation implies that multicollinearity is likely not a concern, allowing you to include both variables in a multiple regression model.
Model Fit Comparison: The Akaike Information Criterion (AIC) suggests that the multiple regression model is a better fit for the data. This is because the data has an AIC of 615.9776. We can compare this to the simple regression model's AIC of 735.4884. Thus, it is evident that multiple regression model is better due to a less complex outcome. 
Final Model Choice: Given the lower AIC and the inclusion of more predictors (HR and H), the multiple regression model is the more appropriate model for understanding Runs Scored (R).
 Analysis indicates that a multiple regression model is more suited for your project, offering a more nuanced understanding of the factors affecting Runs Scored.")
[1] "Correlation between Variables: The correlation between Home Runs (HR) and Hits (H) is 0.285, suggesting a low to moderate relationship. This low correlation implies that multicollinearity is likely not a concern, allowing you to include both variables in a multiple regression model.\nModel Fit Comparison: The Akaike Information Criterion (AIC) suggests that the multiple regression model is a better fit for the data. This is because the data has an AIC of 615.9776. We can compare this to the simple regression model's AIC of 735.4884. Thus, it is evident that multiple regression model is better due to a less complex outcome. \nFinal Model Choice: Given the lower AIC and the inclusion of more predictors (HR and H), the multiple regression model is the more appropriate model for understanding Runs Scored (R).\n Analysis indicates that a multiple regression model is more suited for your project, offering a more nuanced understanding of the factors affecting Runs Scored."
#install.packages("Metrics")
#install.packages("tidyverse")

# Load necessary libraries
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.3     ✔ readr     2.1.4
✔ forcats   1.0.0     ✔ stringr   1.5.0
✔ ggplot2   3.4.4     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.0
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(Metrics)

# Read in the Astros dataset
astros_data <- read.csv("Astros.csv")
astros_data2 <- read.csv("Astros2.csv")

# Convert 'Gtm' column to character type in both data frames
astros_data$Gtm <- as.character(astros_data$Gtm)
astros_data2$Gtm <- as.character(astros_data2$Gtm)

# Merge the datasets
easy_dataframe <- merge(astros_data, astros_data2, by="Gtm")
print(names(easy_dataframe))
 [1] "Gtm"                                "Rk.x"                              
 [3] "Date.x"                             "Place"                             
 [5] "Opp.x"                              "Rslt.x"                            
 [7] "PA"                                 "AB.x"                              
 [9] "R.x"                                "H.x"                               
[11] "X2B.x"                              "X3B.x"                             
[13] "HR.x"                               "RBI"                               
[15] "BB.x"                               "IBB.x"                             
[17] "SO.x"                               "HBP.x"                             
[19] "SH.x"                               "SF.x"                              
[21] "ROE.x"                              "GDP.x"                             
[23] "SB.x"                               "CS.x"                              
[25] "BA"                                 "OBP"                               
[27] "SLG"                                "OPS"                               
[29] "LOB"                                "X..x"                              
[31] "Thr"                                "Opp..Starter..GmeSc."              
[33] "Rk.y"                               "Date.y"                            
[35] "X"                                  "Opp.y"                             
[37] "Rslt.y"                             "IP"                                
[39] "H.y"                                "R.y"                               
[41] "ER"                                 "UER"                               
[43] "BB.y"                               "SO.y"                              
[45] "HR.y"                               "HBP.y"                             
[47] "ERA"                                "BF"                                
[49] "Pit"                                "Str"                               
[51] "IR"                                 "IS"                                
[53] "SB.y"                               "CS.y"                              
[55] "AB.y"                               "X2B.y"                             
[57] "X3B.y"                              "IBB.y"                             
[59] "SH.y"                               "SF.y"                              
[61] "ROE.y"                              "GDP.y"                             
[63] "X..y"                               "Umpire"                            
[65] "Pitchers.Used..Rest.GameScore.Dec."
# Split the data into training and test sets
set.seed(123)  # for reproducibility
training_size <- length(astros_data)
testing_size <-  length(astros_data)

if (training_size > 0){
  random_sub <- sample(astros_data, size = training_size, TRUE)
  print(random_sub)
}
    Thr BB SH RBI       Date  H HBP GDP X2B Opp SF RBI.1 GDP.1    BA   OBP
1     R  3  0   3      7-Apr  8   0   0   4 LAA  0     3     0 0.229 0.289
2     L  3  0  13      8-Apr 14   0   1   3 LAA  0    13     1 0.293 0.346
3     R  2  0   0      9-Apr  2   1   1   0 LAA  0     0     1 0.231 0.292
4     L  5  0   3     10-Apr  7   0   0   1 LAA  0     3     0 0.225 0.296
5     L  5  0   2     12-Apr  8   0   1   2 ARI  0     2     1 0.227 0.304
6     R  4  0   2     13-Apr  6   0   1   0 ARI  2     2     1 0.218 0.294
7     L  0  0   1     15-Apr  5   1   1   1 SEA  0     1     1 0.211 0.281
8     R  3  0   4     16-Apr  8   0   0   2 SEA  1     4     0 0.214 0.282
9     R  7  0   2     17-Apr  4   1   3   1 SEA  0     2     3 0.208 0.289
10    R  6  1   8     18-Apr  9   1   0   1 LAA  0     8     0 0.215 0.301
11    L  3  0   2     19-Apr  6   0   0   2 LAA  0     2     0 0.212 0.297
12    R  1  0   0     20-Apr  1   0   0   0 LAA  0     0     0 0.199 0.282
13    R  2  0   3     22-Apr  7   0   0   1 TOR  0     3     0 0.200 0.279
14    R  1  0   2     23-Apr  8   0   0   0 TOR  0     2     0 0.203 0.278
15    L  5  1   7     24-Apr 11   0   1   5 TOR  0     7     1 0.209 0.285
16    R  3  0   2     25-Apr  8   0   0   1 TEX  0     2     0 0.211 0.285
17    L  4  0   5     26-Apr  6   0   0   1 TEX  0     5     0 0.209 0.285
18    R  4  0   4     27-Apr  7   0   1   1 TEX  0     4     1 0.209 0.285
19    L  1  0   3     28-Apr  3   1   0   1 TEX  0     3     0 0.204 0.279
20    L  8  0  11     29-Apr 14   0   1   5 TOR  2    11     1 0.213 0.291
21    R  3  0   1     30-Apr  8   0   0   1 TOR  0     1     0 0.214 0.290
22    R  0  0   2      1-May  8   0   0   2 TOR  0     2     0 0.214 0.288
23    L  2  0   3      2-May  8   0   0   3 SEA  0     3     0 0.216 0.288
24    R  6  0   4      3-May  5   0   0   0 SEA  0     4     0 0.215 0.289
25    R  5  0   7      4-May 10   0   1   3 SEA  1     7     1 0.219 0.294
26    L  2  0   3      5-May  8   0   0   1 DET  0     3     0 0.220 0.294
27    R  5  0   3      6-May  7   0   0   1 DET  0     3     0 0.220 0.296
28    L  6  0   3      7-May  4   0   0   0 DET  0     3     0 0.218 0.296
29    R  6  0   5      8-May  5   0   1   0 DET  0     5     1 0.217 0.297
30    R  9  0   5     10-May  7   1   0   1 MIN  2     5     0 0.217 0.300
31    R  3  0  11     11-May 15   0   0   4 MIN  1    11     0 0.223 0.304
32    R  6  0   4     12-May  9   0   1   3 MIN  0     4     1 0.224 0.306
33    R  2  0   6     13-May  7   1   1   2 WSN  0     6     1 0.223 0.305
34    R  4  0   6     14-May 12   1   2   3 WSN  0     6     2 0.226 0.308
35    L  3  0   7     15-May 11   0   1   0 WSN  0     7     1 0.229 0.309
36    R  3  1   3     16-May  7   2   1   3 BOS  1     3     1 0.229 0.310
37    R  1  0  13     17-May 15   1   1   2 BOS  0    13     1 0.233 0.312
38    R  0  0   1     18-May  2   0   0   1 BOS  0     1     0 0.229 0.307
39    R  6  0   5     19-May 10   1   0   3 TEX  0     5     0 0.231 0.311
40    L  1  1   0     20-May  8   0   3   0 TEX  0     0     3 0.232 0.310
41    R  2  0   1     21-May  6   0   1   1 TEX  0     1     1 0.232 0.309
42    L  5  0   5     22-May  8   0   0   4 TEX  0     5     0 0.232 0.310
43    R  2  0   1     23-May  4   0   1   1 CLE  0     1     1 0.230 0.308
44    R  1  0   7     24-May  9   1   0   2 CLE  0     7     0 0.231 0.308
45    R  4  0   2     25-May  7   0   1   1 CLE  2     2     1 0.232 0.309
46    R  2  0   1     27-May  9   0   1   1 SEA  0     1     1 0.232 0.308
47    R  1  0   0     28-May  5   1   0   1 SEA  0     0     0 0.231 0.306
48    L  3  0   2     29-May  6   0   1   1 SEA  0     2     1 0.230 0.305
49    R  2  0   5     30-May  6   2   0   0 OAK  0     5     0 0.229 0.304
50    R  4  0   3     31-May  7   0   2   0 OAK  0     3     2 0.228 0.305
51    L  5  0   5      1-Jun 11   1   1   2 OAK  0     5     1 0.230 0.307
52    R  3  0  10      3-Jun 14   1   2   2 KCR  0    10     2 0.233 0.309
53    L  5  0   0      4-Jun  5   0   1   1 KCR  0     0     1 0.232 0.309
54    R  5  0   6      5-Jun 12   2   1   2 KCR  1     6     1 0.234 0.311
55    L  5  0   4      6-Jun 10   0   1   1 SEA  0     4     1 0.235 0.312
56    R  5  0   4      7-Jun  7   0   0   0 SEA  0     4     0 0.235 0.313
57    R  3  0   3      8-Jun  8   0   0   3 SEA  0     3     0 0.235 0.313
58    R  5  0   4     10-Jun 11   0   0   2 MIA  0     4     0 0.236 0.314
59    L  2  0   1     11-Jun  8   0   0   5 MIA  0     1     0 0.236 0.313
60    R  4  0   9     12-Jun 14   1   0   4 MIA  1     9     0 0.239 0.316
61    L  3  0   3     13-Jun  7   0   0   2 TEX  0     3     0 0.238 0.316
62    R  4  0   3     14-Jun  5   1   1   2 TEX  0     3     1 0.237 0.315
63    R  3  0   9     15-Jun  9   1   1   2 TEX  0     9     1 0.237 0.315
64    R  4  0  12     17-Jun 12   1   1   1 CHW  0    12     1 0.239 0.317
65    R  2  0   0     18-Jun  3   0   1   0 CHW  0     0     1 0.237 0.315
66    R  3  0   4     19-Jun  8   0   0   1 CHW  0     4     0 0.238 0.315
67    R  7  0   8     21-Jun 10   0   2   2 NYM  0     8     2 0.239 0.317
68    R  2  0   5     22-Jun  7   2   0   1 NYM  0     5     0 0.239 0.317
69    R  2  0   6     23-Jun 11   1   1   4 NYY  0     6     1 0.240 0.318
70    R  3  0   3     24-Jun  5   1   1   2 NYY  0     3     1 0.239 0.317
71    R  5  0   3     25-Jun  8   0   1   1 NYY  0     3     1 0.239 0.317
72    L  5  0   3     26-Jun  6   0   0   1 NYY  0     3     0 0.238 0.317
73    R  5  0   9     28-Jun 12   0   2   0 NYM  0     9     2 0.239 0.318
74    R  2  0   2     29-Jun  7   1   1   1 NYM  0     2     1 0.238 0.317
75    R  3  0   2     30-Jun  3   0   0   2 NYY  0     2     0 0.237 0.316
76    R  4  0   8      1-Jul 11   0   2   2 LAA  1     8     2 0.238 0.317
77    L  2  0   9      2-Jul 12   1   0   2 LAA  0     9     0 0.240 0.318
78    L  3  0   4      3-Jul 10   0   0   2 LAA  0     4     0 0.240 0.318
79    R  6  0   7      4-Jul  7   0   0   0 KCR  1     7     0 0.240 0.319
80    R  4  0   9      5-Jul 13   0   0   2 KCR  1     9     0 0.242 0.320
81    R  5  0   4      6-Jul  7   0   1   2 KCR  0     4     1 0.241 0.320
82    L 10  0   5      7-Jul  8   0   2   2 KCR  1     5     2 0.242 0.322
83    R  3  0   8      8-Jul 14   0   1   5 OAK  0     8     1 0.243 0.323
84    L  2  1   2      9-Jul  5   1   1   1 OAK  0     2     1 0.242 0.322
85    L  3  0   6     10-Jul  9   0   1   4 OAK  1     6     1 0.243 0.322
86    R  7  0   5     12-Jul  8   0   0   2 LAA  0     5     0 0.242 0.322
87    R  3  0   1     13-Jul  4   0   0   1 LAA  0     1     0 0.241 0.321
88    L  4  0   3     14-Jul  7   2   2   0 LAA  0     3     2 0.241 0.321
89    L  3  0   1     15-Jul  4   0   1   1 OAK  1     1     1 0.240 0.320
90    L  2  0   5     16-Jul  6   0   0   0 OAK  0     5     0 0.239 0.319
91    R  1  0   3     17-Jul  8   0   0   1 OAK  0     3     0 0.239 0.318
92    L  2  0   3 Jul 21 (1) 10   0   2   2 NYY  0     3     2 0.240 0.318
93    R  1  0   7 Jul 21 (2)  7   2   0   2 NYY  0     7     0 0.240 0.318
94    L  1  0   5     22-Jul 10   0   1   2 SEA  1     5     1 0.240 0.318
95    R  2  1   2     23-Jul  7   1   0   3 SEA  0     2     0 0.240 0.318
96    L  3  0   8     24-Jul 12   0   2   3 SEA  0     8     2 0.241 0.318
97    R  3  0   3     25-Jul  7   1   1   3 OAK  0     3     1 0.240 0.318
98    R  3  0   2     26-Jul  7   0   1   2 OAK  0     2     1 0.240 0.317
99    L  2  0   2     27-Jul  5   0   0   2 OAK  0     2     0 0.239 0.316
100   R  2  0   3     28-Jul  6   1   0   3 SEA  0     3     0 0.239 0.316
101   L  7  0  11     29-Jul 15   1   0   2 SEA  1    11     0 0.241 0.318
102   R  4  0   4     30-Jul  9   0   0   3 SEA  0     4     0 0.241 0.318
103   R  3  0   2     31-Jul  7   1   0   1 SEA  0     2     0 0.241 0.318
104   R  3  0   2      1-Aug  6   0   1   2 BOS  1     2     1 0.240 0.317
105   R  2  0   1      2-Aug  9   0   0   2 BOS  0     1     0 0.240 0.317
106   L  0  0   6      3-Aug 12   1   0   4 BOS  1     6     0 0.241 0.318
107   R  6  0   6      4-Aug 11   0   1   2 CLE  0     6     1 0.242 0.318
108   R  2  0   9      5-Aug 14   0   2   2 CLE  1     9     2 0.243 0.319
109   R  1  0   1      6-Aug  6   0   1   4 CLE  0     1     1 0.243 0.318
110   R  1  0   0      7-Aug  2   0   1   0 CLE  0     0     1 0.241 0.317
111   L  3  0   7      9-Aug  7   0   1   2 TEX  1     7     1 0.241 0.317
112   R  5  0   4     10-Aug  8   1   0   0 TEX  0     4     0 0.241 0.317
113   L  3  0   7     11-Aug 10   0   0   1 TEX  1     7     0 0.242 0.317
114   R  4  0   7     12-Aug 11   0   2   2 OAK  1     7     2 0.242 0.318
115   L  3  0   8     13-Aug 12   0   2   2 OAK  0     8     2 0.243 0.318
116   L  1  0   6     14-Aug 10   0   0   2 OAK  0     6     0 0.244 0.318
117   R  2  0   2     15-Aug  7   1   1   1 CHW  1     2     1 0.244 0.318
118   R  4  0   3     16-Aug  9   0   0   4 CHW  0     3     0 0.244 0.318
119   R  3  0   3     17-Aug  5   0   0   2 CHW  2     3     0 0.243 0.317
120   R  4  0  21     18-Aug 25   0   1   5 CHW  0    21     1 0.246 0.320
121   R  1  0   2     19-Aug  7   0   1   2 ATL  0     2     1 0.246 0.319
122   R  3  0   4     20-Aug  7   1   0   1 ATL  0     4     0 0.245 0.319
123   R  4  0   5     21-Aug 10   0   0   0 ATL  1     5     0 0.246 0.319
124   R  1  0   4     23-Aug 12   1   2   3 MIN  0     4     2 0.247 0.319
125   R  3  0   5     24-Aug  6   1   2   3 MIN  2     5     2 0.246 0.319
126   R  3  0   5     25-Aug 11   0   1   3 MIN  0     5     1 0.247 0.320
127   R  2  0   0     26-Aug  4   1   0   0 BAL  0     0     0 0.246 0.319
128   R  0  0   1     27-Aug  4   0   2   1 BAL  0     1     2 0.246 0.318
129   R  3  0   3     28-Aug  6   1   2   3 BAL  0     3     2 0.245 0.318
130   R  6  0   4     30-Aug  8   0   2   1 TEX  1     4     2 0.245 0.318
131   L  7  0   5     31-Aug 11   0   1   1 TEX  0     5     1 0.246 0.319
132   L  4  0   4      2-Sep  7   0   0   3 LAA  1     4     0 0.246 0.319
133   R  1  0   1      3-Sep  7   0   2   2 LAA  0     1     2 0.245 0.318
134   L  3  0   9      4-Sep 11   2   2   2 LAA  0     9     2 0.245 0.318
135   L  1  0   1      5-Sep  8   0   1   1 TEX  0     1     1 0.246 0.318
136   R  3  0   3      6-Sep  8   0   0   0 TEX  0     3     0 0.245 0.318
137   L  8  1   3      7-Sep  4   0   0   0 TEX  0     3     0 0.245 0.318
138   R  7  0   4      9-Sep  6   0   1   1 LAA  0     4     1 0.244 0.318
139   R  2  0   0     10-Sep  7   1   2   2 LAA  0     0     2 0.244 0.318
140   L  8  0  11     11-Sep 12   1   0   1 LAA  0    11     0 0.245 0.320
141   L  2  0   6     12-Sep 13   1   1   2 DET  0     6     1 0.246 0.320
142   R  1  0   6     13-Sep 12   1   1   2 DET  0     6     1 0.246 0.320
143   L  4  1   2     14-Sep  5   1   0   1 DET  1     2     0 0.246 0.320
144   R  4  0   5     15-Sep  9   1   0   4 OAK  0     5     0 0.246 0.320
145   R  3  0   5     16-Sep  8   1   1   1 OAK  0     5     1 0.246 0.320
146   L  0  0   5     17-Sep 10   0   2   1 OAK  0     5     2 0.246 0.320
147   L  3  0  11     18-Sep 15   0   1   3 OAK  0    11     1 0.248 0.321
148   R  1  0   4     19-Sep  6   0   0   1 TBR  0     4     0 0.247 0.320
149   L  5  0   5     20-Sep  8   0   1   2 TBR  1     5     1 0.247 0.321
150   R  1  0   5     21-Sep 10   1   0   1 TBR  0     5     0 0.247 0.321
151   R  0  0   0     22-Sep  2   0   0   0 BAL  0     0     0 0.246 0.319
152   R  2  0   0     23-Sep  4   0   1   1 BAL  0     0     1 0.246 0.319
153   R  6  0  11     24-Sep 12   0   1   3 BAL  1    11     1 0.246 0.319
154   R  4  0   5     25-Sep  9   1   0   3 BAL  2     5     0 0.246 0.319
155   R  5  0  10     27-Sep 14   1   0   1 ARI  1    10     0 0.247 0.320
156   R  3  0   2     28-Sep  7   0   2   1 ARI  0     2     2 0.247 0.320
157   R  0  0   3     30-Sep  7   0   0   4 TBR  0     3     0 0.247 0.319
158   L  1  1   1      1-Oct  6   0   0   2 TBR  0     1     0 0.246 0.319
159   R  1  0   3      2-Oct 10   0   1   1 TBR  0     3     1 0.247 0.319
160   R  0  0   0      3-Oct  2   0   0   0 PHI  0     0     0 0.246 0.318
161   L  4  0  10      4-Oct 17   0   2   5 PHI  0    10     2 0.247 0.319
162   L  2  0   3      5-Oct 12   0   4   2 PHI  0     3     4 0.248 0.319
      SLG Opp..Starter..GmeSc. Opp.1 SH.1 SLG.1  BA.1   OPS  BA.2  R LOB
1   0.514         S.Ohtani(60)   LAA    0 0.514 0.229 0.804 0.229  3   8
2   0.707        R.Detmers(49)   LAA    0 0.707 0.293 1.052 0.293 13   3
3   0.529    N.Syndergaard(63)   LAA    0 0.529 0.231 0.821 0.231  0   5
4   0.457         J.Suarez(49)   LAA    0 0.457 0.225 0.753 0.225  4   8
5   0.442      M.Bumgarner(53)   ARI    0 0.442 0.227 0.746 0.227  2  10
6   0.398          M.Kelly(66)   ARI    0 0.398 0.218 0.692 0.218  2   9
7   0.371       M.Gonzales(71)   SEA    0 0.371 0.211 0.653 0.211  1   4
8   0.380         C.Flexen(52)   SEA    0 0.380 0.214 0.662 0.214  4   7
9   0.372          M.Brash(55)   SEA    0 0.372 0.208 0.661 0.208  2   6
10  0.385       M.Lorenzen(36)   LAA    1 0.385 0.215 0.686 0.215  8   8
11  0.380       P.Sandoval(55)   LAA    0 0.380 0.212 0.677 0.212  2   8
12  0.355         S.Ohtani(81)   LAA    0 0.355 0.199 0.637 0.199  0   2
13  0.346      R.Stripling(41)   TOR    0 0.346 0.200 0.625 0.200  3   6
14  0.344         A.Manoah(55)   TOR    0 0.344 0.203 0.622 0.203  2   6
15  0.362        Y.Kikuchi(42)   TOR    1 0.362 0.209 0.647 0.209  8   9
16  0.361        D.Dunning(55)   TEX    0 0.361 0.211 0.646 0.211  2   9
17  0.358          T.Hearn(44)   TEX    0 0.358 0.209 0.643 0.209  5   4
18  0.356           G.Otto(50)   TEX    0 0.356 0.209 0.641 0.209  4   7
19  0.350          M.Pérez(73)   TEX    0 0.350 0.204 0.630 0.204  3   2
20  0.372        Y.Kikuchi(35)   TOR    0 0.372 0.213 0.663 0.213 11  10
21  0.370        J.Berríos(54)   TOR    0 0.370 0.214 0.661 0.214  1  11
22  0.369        K.Gausman(67)   TOR    0 0.369 0.214 0.657 0.214  2   6
23  0.376       M.Gonzales(44)   SEA    0 0.376 0.216 0.664 0.216  3   7
24  0.376         C.Flexen(58)   SEA    0 0.376 0.215 0.666 0.215  4   6
25  0.378          M.Brash(30)   SEA    0 0.378 0.219 0.672 0.219  7   6
26  0.382         T.Skubal(61)   DET    0 0.382 0.220 0.676 0.220  3   6
27  0.384        B.Brieske(45)   DET    0 0.384 0.220 0.680 0.220  3   9
28  0.382      E.Rodriguez(73)   DET    0 0.382 0.218 0.678 0.218  3   7
29  0.383        W.Peralta(54)   DET    0 0.383 0.217 0.679 0.217  5   5
30  0.378           J.Ryan(36)   MIN    0 0.378 0.217 0.678 0.217  5  13
31  0.387         C.Archer(30)   MIN    0 0.387 0.223 0.691 0.223 11   7
32  0.391         J.Winder(33)   MIN    0 0.391 0.224 0.697 0.224  5   9
33  0.396           J.Gray(39)   WSN    0 0.396 0.223 0.701 0.223  6   3
34  0.401          E.Fedde(43)   WSN    0 0.401 0.226 0.709 0.226  6  10
35  0.408         P.Corbin(43)   WSN    0 0.408 0.229 0.717 0.229  8   5
36  0.408       G.Whitlock(54)   BOS    1 0.408 0.229 0.718 0.229  3   8
37  0.422         N.Eovaldi(9)   BOS    0 0.422 0.233 0.734 0.233 13   5
38  0.417        N.Pivetta(87)   BOS    0 0.417 0.229 0.724 0.229  1   1
39  0.417           G.Otto(49)   TEX    0 0.417 0.231 0.728 0.231  5   9
40  0.414          M.Pérez(75)   TEX    1 0.414 0.232 0.724 0.232  0   5
41  0.412           J.Gray(54)   TEX    0 0.412 0.232 0.721 0.232  2   5
42  0.413          T.Hearn(36)   TEX    0 0.413 0.232 0.724 0.232  5   7
43  0.410       T.McKenzie(69)   CLE    0 0.410 0.230 0.718 0.230  1   4
44  0.410         Z.Plesac(22)   CLE    0 0.410 0.231 0.718 0.231  7   4
45  0.408      C.Quantrill(51)   CLE    0 0.408 0.232 0.717 0.232  2   7
46  0.405         C.Flexen(63)   SEA    0 0.405 0.232 0.714 0.232  1   9
47  0.401        L.Gilbert(74)   SEA    0 0.401 0.231 0.707 0.231  0   7
48  0.399       M.Gonzales(61)   SEA    0 0.399 0.230 0.704 0.230  2   6
49  0.401      P.Blackburn(53)   OAK    0 0.401 0.229 0.706 0.229  5   6
50  0.400         F.Montas(60)   OAK    0 0.400 0.228 0.704 0.228  3   6
51  0.399          C.Irvin(53)   OAK    0 0.399 0.230 0.705 0.230  5  10
52  0.404         B.Singer(27)   KCR    0 0.404 0.233 0.714 0.233 10   5
53  0.400          K.Bubic(57)   KCR    0 0.400 0.232 0.709 0.232  0  10
54  0.404        J.Heasley(49)   KCR    0 0.404 0.234 0.716 0.234  7  11
55  0.408            R.Ray(37)   SEA    0 0.408 0.235 0.720 0.235  4   9
56  0.406         C.Flexen(55)   SEA    0 0.406 0.235 0.719 0.235  4   7
57  0.405        L.Gilbert(46)   SEA    0 0.405 0.235 0.718 0.235  3   6
58  0.407          P.López(46)   MIA    0 0.407 0.236 0.721 0.236  4  11
59  0.407        B.Garrett(59)   MIA    0 0.407 0.236 0.720 0.236  1   9
60  0.412        E.Cabrera(26)   MIA    0 0.412 0.239 0.728 0.239  9   8
61  0.409          T.Hearn(42)   TEX    0 0.409 0.238 0.725 0.238  3   6
62  0.408        D.Dunning(68)   TEX    0 0.408 0.237 0.723 0.237  4   6
63  0.409         T.Miller(18)   TEX    0 0.409 0.237 0.724 0.237  9   3
64  0.416        L.Giolito(21)   CHW    0 0.416 0.239 0.733 0.239 13   3
65  0.412          J.Cueto(76)   CHW    0 0.412 0.237 0.727 0.237  0   3
66  0.413         M.Kopech(40)   CHW    0 0.413 0.238 0.728 0.238  4   6
67  0.416       T.Williams(41)   NYM    0 0.416 0.239 0.734 0.239  8   6
68  0.418       C.Carrasco(29)   NYM    0 0.418 0.239 0.735 0.239  5   6
69  0.420        J.Taillon(28)   NYY    0 0.420 0.240 0.738 0.240  6   7
70  0.419       L.Severino(55)   NYY    0 0.419 0.239 0.736 0.239  3   5
71  0.420           G.Cole(71)   NYY    0 0.420 0.239 0.737 0.239  3   8
72  0.418         N.Cortes(50)   NYY    0 0.418 0.238 0.734 0.238  3   9
73  0.420       C.Carrasco(28)   NYM    0 0.420 0.239 0.738 0.239  9   6
74  0.419         T.Walker(71)   NYM    0 0.419 0.238 0.736 0.238  2   7
75  0.416       L.Severino(60)   NYY    0 0.416 0.237 0.733 0.237  2   3
76  0.420       M.Lorenzen(14)   LAA    0 0.420 0.238 0.737 0.238  8   6
77  0.425       P.Sandoval(38)   LAA    0 0.425 0.240 0.743 0.240  9   7
78  0.426         J.Suarez(52)   LAA    0 0.426 0.240 0.744 0.240  4   8
79  0.425        J.Heasley(61)   KCR    0 0.425 0.240 0.744 0.240  7   6
80  0.430        Z.Greinke(23)   KCR    0 0.430 0.242 0.750 0.242  9   7
81  0.429         B.Keller(43)   KCR    0 0.429 0.241 0.749 0.241  4   7
82  0.431          K.Bubic(47)   KCR    0 0.431 0.242 0.752 0.242  5  11
83  0.433      P.Blackburn(29)   OAK    0 0.433 0.243 0.756 0.243  8   9
84  0.431          Z.Logue(54)   OAK    1 0.431 0.242 0.752 0.242  2   6
85  0.431          C.Irvin(56)   OAK    0 0.431 0.243 0.753 0.243  6   5
86  0.430    N.Syndergaard(43)   LAA    0 0.430 0.242 0.752 0.242  6  10
87  0.427         S.Ohtani(70)   LAA    0 0.427 0.241 0.748 0.241  1   6
88  0.425        R.Detmers(57)   LAA    0 0.425 0.241 0.745 0.241  3   8
89  0.422          C.Irvin(65)   OAK    0 0.422 0.240 0.742 0.240  1   5
90  0.421         J.Koenig(46)   OAK    0 0.421 0.239 0.740 0.239  5   3
91  0.421          A.Oller(41)   OAK    0 0.421 0.239 0.739 0.239  3   7
92  0.420     J.Montgomery(58)   NYY    0 0.420 0.240 0.739 0.240  3   7
93  0.422         D.Germán(28)   NYY    0 0.422 0.240 0.740 0.240  7   5
94  0.424       M.Gonzales(32)   SEA    0 0.424 0.240 0.741 0.240  5   5
95  0.422        L.Gilbert(61)   SEA    1 0.422 0.240 0.740 0.240  3   6
96  0.424            R.Ray(16)   SEA    0 0.424 0.241 0.742 0.241  8   5
97  0.425          A.Oller(47)   OAK    0 0.425 0.240 0.743 0.240  5   6
98  0.424         F.Montas(44)   OAK    0 0.424 0.240 0.741 0.240  3   6
99  0.424          C.Irvin(64)   OAK    0 0.424 0.239 0.740 0.239  2   5
100 0.423        L.Gilbert(58)   SEA    0 0.423 0.239 0.739 0.239  4   5
101 0.427            R.Ray(31)   SEA    0 0.427 0.241 0.745 0.241 11  12
102 0.427         C.Flexen(51)   SEA    0 0.427 0.241 0.746 0.241  4   8
103 0.425          G.Kirby(52)   SEA    0 0.425 0.241 0.743 0.241  3   9
104 0.424        N.Eovaldi(63)   BOS    0 0.424 0.240 0.741 0.240  2   7
105 0.422       K.Crawford(59)   BOS    0 0.422 0.240 0.740 0.240  1   9
106 0.424           R.Hill(32)   BOS    0 0.424 0.241 0.741 0.241  6   6
107 0.425         Z.Plesac(32)   CLE    0 0.425 0.242 0.743 0.242  6  11
108 0.426         H.Gaddis(14)   CLE    0 0.426 0.243 0.745 0.243  9   5
109 0.425      C.Quantrill(69)   CLE    0 0.425 0.243 0.743 0.243  1   5
110 0.423       T.McKenzie(85)   CLE    0 0.423 0.241 0.739 0.241  0   2
111 0.422          M.Pérez(26)   TEX    0 0.422 0.241 0.739 0.241  7   2
112 0.422           G.Otto(52)   TEX    0 0.422 0.241 0.738 0.241  4  11
113 0.423         C.Ragans(29)   TEX    0 0.423 0.242 0.740 0.242  7   6
114 0.423          A.Oller(45)   OAK    0 0.423 0.242 0.741 0.242  7   6
115 0.425          Z.Logue(28)   OAK    0 0.425 0.243 0.744 0.243  8   4
116 0.425          C.Irvin(36)   OAK    0 0.425 0.244 0.744 0.244  6   5
117 0.424          J.Cueto(66)   CHW    0 0.424 0.244 0.742 0.244  2   8
118 0.424          D.Cease(44)   CHW    0 0.424 0.244 0.742 0.244  3   9
119 0.423         M.Kopech(50)   CHW    0 0.423 0.243 0.740 0.243  3   5
120 0.428        L.Giolito(19)   CHW    0 0.428 0.246 0.748 0.246 21   7
121 0.427         K.Wright(58)   ATL    0 0.427 0.246 0.747 0.246  2   5
122 0.426        S.Strider(69)   ATL    0 0.426 0.245 0.744 0.245  4   9
123 0.424         C.Morton(63)   ATL    0 0.424 0.246 0.743 0.246  5   9
124 0.425        A.Sanchez(45)   MIN    0 0.425 0.247 0.745 0.247  4   8
125 0.426          D.Bundy(52)   MIN    0 0.426 0.246 0.746 0.246  5   2
126 0.427         C.Archer(27)   MIN    0 0.427 0.247 0.747 0.247  6   5
127 0.425        K.Bradish(82)   BAL    0 0.425 0.246 0.744 0.246  0   6
128 0.423         D.Kremer(70)   BAL    0 0.423 0.246 0.742 0.246  1   1
129 0.423           A.Voth(67)   BAL    0 0.423 0.245 0.742 0.245  3   6
130 0.423        D.Dunning(45)   TEX    0 0.423 0.245 0.741 0.245  4   9
131 0.422          M.Pérez(30)   TEX    0 0.422 0.246 0.741 0.246  5  13
132 0.421        R.Detmers(37)   LAA    0 0.421 0.246 0.740 0.246  4   7
133 0.419         S.Ohtani(71)   LAA    0 0.419 0.245 0.737 0.245  1  10
134 0.420       T.Davidson(33)   LAA    0 0.420 0.245 0.739 0.245  9   5
135 0.419          M.Pérez(65)   TEX    0 0.419 0.246 0.738 0.246  1   6
136 0.419           G.Otto(46)   TEX    0 0.419 0.245 0.737 0.245  3   9
137 0.417         C.Ragans(59)   TEX    1 0.417 0.245 0.735 0.245  4   7
138 0.418       M.Lorenzen(57)   LAA    0 0.418 0.244 0.736 0.244  4   7
139 0.417         S.Ohtani(56)   LAA    0 0.417 0.244 0.735 0.244  1   6
140 0.420       T.Davidson(31)   LAA    0 0.420 0.245 0.739 0.245 12   8
141 0.419      E.Rodriguez(28)   DET    0 0.419 0.246 0.739 0.246  7   8
142 0.421      D.Hutchison(36)   DET    0 0.421 0.246 0.741 0.246  6   8
143 0.420          J.Wentz(50)   DET    1 0.420 0.246 0.740 0.246  2   8
144 0.420     J.Kaprielian(54)   OAK    0 0.420 0.246 0.741 0.246  5   8
145 0.422       A.Martinez(46)   OAK    0 0.422 0.246 0.743 0.246  5   7
146 0.424          C.Irvin(48)   OAK    0 0.424 0.246 0.744 0.246  5   3
147 0.425      K.Waldichuk(29)   OAK    0 0.425 0.248 0.746 0.248 11   6
148 0.424      D.Rasmussen(46)   TBR    0 0.424 0.247 0.744 0.247  4   3
149 0.424     S.McClanahan(31)   TBR    0 0.424 0.247 0.744 0.247  5   6
150 0.424         C.Kluber(62)   TBR    0 0.424 0.247 0.745 0.247  5   6
151 0.422        K.Bradish(90)   BAL    0 0.422 0.246 0.741 0.246  0   2
152 0.421         D.Kremer(83)   BAL    0 0.421 0.246 0.739 0.246  0   4
153 0.421        M.Baumann(48)   BAL    0 0.421 0.246 0.741 0.246 11   5
154 0.421           A.Voth(61)   BAL    0 0.421 0.246 0.740 0.246  6   7
155 0.423         Z.Davies(36)   ARI    0 0.423 0.247 0.744 0.247 10  10
156 0.423         Z.Gallen(62)   ARI    0 0.423 0.247 0.743 0.247  2   7
157 0.423      D.Rasmussen(62)   TBR    0 0.423 0.247 0.742 0.247  3   4
158 0.422     S.McClanahan(50)   TBR    1 0.422 0.246 0.741 0.246  2   5
159 0.422         C.Kluber(50)   TBR    0 0.422 0.247 0.741 0.247  3   8
160 0.420           A.Nola(79)   PHI    0 0.420 0.246 0.738 0.246  0   2
161 0.423         R.Suárez(21)   PHI    0 0.423 0.247 0.742 0.247 10   9
162 0.424         B.Falter(49)   PHI    0 0.424 0.248 0.743 0.248  3   6
        Date.1 AB OBP.1 PA H.1 R.1 X.
1        7-Apr 35 0.289 38   8   3  9
2        8-Apr 40 0.346 43  14  13 12
3        9-Apr 29 0.292 32   2   0 10
4       10-Apr 34 0.296 39   7   4  9
5       12-Apr 34 0.304 39   8   2  9
6       13-Apr 34 0.294 40   6   2 11
7       15-Apr 31 0.281 32   5   1 10
8       16-Apr 34 0.282 38   8   4  9
9       17-Apr 27 0.289 35   4   2  9
10      18-Apr 32 0.301 40   9   8 10
11      19-Apr 33 0.297 37   6   2 10
12      20-Apr 28 0.282 29   1   0  9
13      22-Apr 34 0.279 36   7   3 12
14      23-Apr 34 0.278 35   8   2 10
15      24-Apr 38 0.285 44  11   8 10
16      25-Apr 35 0.285 38   8   2  9
17      26-Apr 32 0.285 36   6   5  9
18      27-Apr 34 0.285 38   7   4 10
19      28-Apr 30 0.279 32   3   3 10
20      29-Apr 38 0.291 48  14  11  9
21      30-Apr 36 0.290 39   8   1 11
22       1-May 35 0.288 35   8   2 10
23       2-May 32 0.288 34   8   3  9
24       3-May 28 0.289 34   5   4  9
25       4-May 31 0.294 37  10   7 10
26       5-May 31 0.294 33   8   3 10
27       6-May 31 0.296 36   7   3  9
28       7-May 28 0.296 34   4   3 11
29       8-May 28 0.297 34   5   5 10
30      10-May 33 0.300 45   7   5 10
31      11-May 41 0.304 45  15  11  9
32      12-May 35 0.306 41   9   5 10
33      13-May 33 0.305 36   7   6 10
34      14-May 38 0.308 43  12   6 11
35      15-May 37 0.309 40  11   8 10
36      16-May 31 0.310 38   7   3  9
37      17-May 43 0.312 45  15  13 11
38      18-May 29 0.307 29   2   1 10
39      19-May 31 0.311 38  10   5  9
40      20-May 30 0.310 32   8   0 11
41      21-May 29 0.309 31   6   2  9
42      22-May 31 0.310 36   8   5  9
43      23-May 30 0.308 32   4   1  9
44      24-May 33 0.308 35   9   7  9
45      25-May 27 0.309 33   7   2  9
46      27-May 35 0.308 37   9   1 10
47      28-May 32 0.306 34   5   0 11
48      29-May 32 0.305 35   6   2 11
49      30-May 34 0.304 38   6   5 10
50      31-May 32 0.305 36   7   3  9
51       1-Jun 36 0.307 42  11   5 11
52       3-Jun 38 0.309 42  14  10 10
53       4-Jun 32 0.309 37   5   0 10
54       5-Jun 37 0.311 45  12   7 10
55       6-Jun 35 0.312 40  10   4 10
56       7-Jun 30 0.313 35   7   4  9
57       8-Jun 33 0.313 36   8   3 11
58      10-Jun 37 0.314 42  11   4  9
59      11-Jun 35 0.313 37   8   1  9
60      12-Jun 35 0.316 41  14   9 10
61      13-Jun 33 0.316 36   7   3 10
62      14-Jun 32 0.315 37   5   4 10
63      15-Jun 35 0.315 39   9   9 12
64      17-Jun 35 0.317 40  12  13 12
65      18-Jun 28 0.315 30   3   0 11
66      19-Jun 31 0.315 34   8   4  9
67      21-Jun 31 0.317 38  10   8  9
68      22-Jun 31 0.317 35   7   5  9
69      23-Jun 37 0.318 40  11   6  9
70      24-Jun 31 0.317 35   5   3  9
71      25-Jun 33 0.317 38   8   3 10
72      26-Jun 36 0.317 41   6   3 13
73      28-Jun 37 0.318 42  12   9 12
74      29-Jun 33 0.317 36   7   2 11
75      30-Jun 26 0.316 29   3   2  9
76       1-Jul 33 0.317 38  11   8 10
77       2-Jul 37 0.318 40  12   9 12
78       3-Jul 35 0.318 38  10   4  9
79       4-Jul 32 0.319 39   7   7 11
80       5-Jul 35 0.320 40  13   9  9
81       6-Jul 33 0.320 38   7   4 10
82       7-Jul 29 0.322 40   8   5 10
83       8-Jul 41 0.323 44  14   8  9
84       9-Jul 31 0.322 35   5   2 10
85      10-Jul 34 0.322 38   9   6 10
86      12-Jul 36 0.322 43   8   6 10
87      13-Jul 31 0.321 34   4   1 10
88      14-Jul 34 0.321 40   7   3 12
89      15-Jul 29 0.320 33   4   1  9
90      16-Jul 30 0.319 32   6   5  9
91      17-Jul 36 0.318 37   8   3 10
92  Jul 21 (1) 34 0.318 36  10   3 11
93  Jul 21 (2) 32 0.318 36   7   7  9
94      22-Jul 35 0.318 37  10   5  9
95      23-Jul 32 0.318 36   7   3 10
96      24-Jul 37 0.318 40  12   8  9
97      25-Jul 34 0.318 38   7   5 10
98      26-Jul 33 0.317 36   7   3 11
99      27-Jul 32 0.316 34   5   2  9
100     28-Jul 30 0.316 33   6   4  9
101     29-Jul 38 0.318 47  15  11 13
102     30-Jul 35 0.318 39   9   4 10
103     31-Jul 35 0.318 39   7   3 13
104      1-Aug 32 0.317 36   6   2 11
105      2-Aug 35 0.317 37   9   1 11
106      3-Aug 34 0.318 36  12   6  9
107      4-Aug 38 0.318 44  11   6 11
108      5-Aug 38 0.319 41  14   9 10
109      6-Aug 32 0.318 33   6   1  9
110      7-Aug 28 0.317 29   2   0 12
111      9-Aug 29 0.317 33   7   7 10
112     10-Aug 38 0.317 44   8   4 12
113     11-Aug 33 0.317 37  10   7  9
114     12-Aug 32 0.318 37  11   7 10
115     13-Aug 33 0.318 36  12   8 10
116     14-Aug 34 0.318 35  10   6  9
117     15-Aug 33 0.318 37   7   2 11
118     16-Aug 35 0.318 39   9   3 11
119     17-Aug 30 0.317 35   5   3  9
120     18-Aug 51 0.320 55  25  21 12
121     19-Aug 33 0.319 34   7   2 11
122     20-Aug 40 0.319 44   7   4  9
123     21-Aug 36 0.319 41  10   5  9
124     23-Aug 34 0.319 36  12   4  9
125     24-Aug 25 0.319 31   6   5 11
126     25-Aug 32 0.320 35  11   6  9
127     26-Aug 30 0.319 33   4   0 11
128     27-Aug 29 0.318 29   4   1 10
129     28-Aug 28 0.318 33   6   3 10
130     30-Aug 33 0.318 40   8   4 10
131     31-Aug 37 0.319 45  11   5 10
132      2-Sep 33 0.319 38   7   4 10
133      3-Sep 42 0.318 44   7   1 11
134      4-Sep 36 0.318 41  11   9 12
135      5-Sep 30 0.318 31   8   1 10
136      6-Sep 35 0.318 39   8   3 11
137      7-Sep 30 0.318 39   4   4 10
138      9-Sep 28 0.318 35   6   4 10
139     10-Sep 31 0.318 34   7   1  9
140     11-Sep 35 0.320 44  12  12  9
141     12-Sep 39 0.320 42  13   7 10
142     13-Sep 39 0.320 41  12   6 10
143     14-Sep 30 0.320 37   5   2 10
144     15-Sep 32 0.320 37   9   5  9
145     16-Sep 32 0.320 36   8   5  9
146     17-Sep 35 0.320 35  10   5  9
147     18-Sep 38 0.321 41  15  11 11
148     19-Sep 33 0.320 34   6   4 10
149     20-Sep 32 0.321 38   8   5 11
150     21-Sep 36 0.321 38  10   5 11
151     22-Sep 29 0.319 29   2   0  9
152     23-Sep 29 0.319 31   4   0  9
153     24-Sep 36 0.319 43  12  11 11
154     25-Sep 37 0.319 44   9   6 11
155     27-Sep 37 0.320 44  14  10 11
156     28-Sep 35 0.320 38   7   2 12
157     30-Sep 34 0.319 34   7   3 10
158      1-Oct 29 0.319 31   6   2 10
159      2-Oct 34 0.319 35  10   3 10
160      3-Oct 29 0.318 29   2   0 13
161      4-Oct 39 0.319 43  17  10 14
162      5-Oct 31 0.319 33  12   3 12
if (testing_size > 0){
  random_sub2 <- sample(astros_data, size = testing_size, TRUE)
  print(random_sub2)
}
    SH Place RBI SO X2B PA ROE X3B BB Opp..Starter..GmeSc.  H HR PA.1  R R.1
1    0     @   3 10   4 38   0   0  3         S.Ohtani(60)  8  2   38  3   3
2    0     @  13  8   3 43   0   0  3        R.Detmers(49) 14  6   43 13  13
3    0     @   0  5   0 32   1   0  2    N.Syndergaard(63)  2  0   32  0   0
4    0     @   3  6   1 39   0   0  5         J.Suarez(49)  7  0   39  4   4
5    0     @   2  2   2 39   1   0  5      M.Bumgarner(53)  8  1   39  2   2
6    0     @   2  8   0 40   0   0  4          M.Kelly(66)  6  0   40  2   2
7    0     @   1  8   1 32   0   0  0       M.Gonzales(71)  5  0   32  1   1
8    0     @   4  7   2 38   0   1  3         C.Flexen(52)  8  1   38  4   4
9    0     @   2 10   1 35   0   0  7          M.Brash(55)  4  1   35  2   2
10   1         8  6   1 40   0   0  6       M.Lorenzen(36)  9  2   40  8   8
11   0         2  6   2 37   1   0  3       P.Sandoval(55)  6  1   37  2   2
12   0         0 15   0 29   0   0  1         S.Ohtani(81)  1  0   29  0   0
13   0         3 10   1 36   0   0  2      R.Stripling(41)  7  0   36  3   3
14   0         2 10   0 35   0   0  1         A.Manoah(55)  8  1   35  2   2
15   1         7 10   5 44   1   0  5        Y.Kikuchi(42) 11  2   44  8   8
16   0     @   2  9   1 38   0   0  3        D.Dunning(55)  8  1   38  2   2
17   0     @   5  8   1 36   0   0  4          T.Hearn(44)  6  1   36  5   5
18   0     @   4 10   1 38   1   0  4           G.Otto(50)  7  1   38  4   4
19   0     @   3  6   1 32   0   0  1          M.Pérez(73)  3  1   32  3   3
20   0     @  11 11   5 48   0   0  8        Y.Kikuchi(35) 14  3   48 11  11
21   0     @   1  8   1 39   1   0  3        J.Berríos(54)  8  1   39  1   1
22   0     @   2 12   2 35   1   1  0        K.Gausman(67)  8  0   35  2   2
23   0         3  4   3 34   0   0  2       M.Gonzales(44)  8  2   34  3   3
24   0         4  4   0 34   0   0  6         C.Flexen(58)  5  2   34  4   4
25   0         7  9   3 37   0   0  5          M.Brash(30) 10  0   37  7   7
26   0         3 11   1 33   0   0  2         T.Skubal(61)  8  2   33  3   3
27   0         3  3   1 36   0   0  5        B.Brieske(45)  7  2   36  3   3
28   0         3  9   0 34   0   1  6      E.Rodriguez(73)  4  1   34  3   3
29   0         5 12   0 34   0   0  6        W.Peralta(54)  5  2   34  5   5
30   0     @   5  7   1 45   0   0  9           J.Ryan(36)  7  0   45  5   5
31   0     @  11  6   4 45   0   0  3         C.Archer(30) 15  2   45 11  11
32   0     @   4  9   3 41   0   0  6         J.Winder(33)  9  2   41  5   5
33   0     @   6  6   2 36   0   0  2           J.Gray(39)  7  3   36  6   6
34   0     @   6 12   3 43   1   1  4          E.Fedde(43) 12  1   43  6   6
35   0     @   7  7   0 40   0   0  3         P.Corbin(43) 11  4   40  8   8
36   1     @   3  7   3 38   0   0  3       G.Whitlock(54)  7  1   38  3   3
37   0     @  13  8   2 45   1   0  1         N.Eovaldi(9) 15  6   45 13  13
38   0     @   1  8   1 29   0   0  0        N.Pivetta(87)  2  1   29  1   1
39   0         5  6   3 38   0   0  6           G.Otto(49) 10  0   38  5   5
40   1         0  5   0 32   0   0  1          M.Pérez(75)  8  0   32  0   0
41   0         1  5   1 31   0   1  2           J.Gray(54)  6  0   31  2   2
42   0         5  5   4 36   0   0  5          T.Hearn(36)  8  1   36  5   5
43   0         1  4   1 32   0   0  2       T.McKenzie(69)  4  1   32  1   1
44   0         7  9   2 35   0   0  1         Z.Plesac(22)  9  1   35  7   7
45   0         2  7   1 33   0   0  4      C.Quantrill(51)  7  0   33  2   2
46   0     @   1  8   1 37   0   0  2         C.Flexen(63)  9  0   37  1   1
47   0     @   0  6   1 34   0   0  1        L.Gilbert(74)  5  0   34  0   0
48   0     @   2  3   1 35   0   0  3       M.Gonzales(61)  6  1   35  2   2
49   0     @   5  7   0 38   1   1  2      P.Blackburn(53)  6  3   38  5   5
50   0     @   3  9   0 36   0   0  4         F.Montas(60)  7  1   36  3   3
51   0     @   5  3   2 42   0   0  5          C.Irvin(53) 11  0   42  5   5
52   0     @  10  7   2 42   0   0  3         B.Singer(27) 14  3   42 10  10
53   0     @   0  5   1 37   1   0  5          K.Bubic(57)  5  0   37  0   0
54   0     @   6  9   2 45   0   1  5        J.Heasley(49) 12  2   45  7   7
55   0         4  7   1 40   1   0  5            R.Ray(37) 10  3   40  4   4
56   0         4  3   0 35   0   0  5         C.Flexen(55)  7  1   35  4   4
57   0         3  7   3 36   0   0  3        L.Gilbert(46)  8  0   36  3   3
58   0         4 10   2 42   0   0  5          P.López(46) 11  2   42  4   4
59   0         1  9   5 37   1   0  2        B.Garrett(59)  8  0   37  1   1
60   0         9  6   4 41   0   0  4        E.Cabrera(26) 14  2   41  9   9
61   0     @   3  5   2 36   0   0  3          T.Hearn(42)  7  0   36  3   3
62   0     @   3  8   2 37   0   0  4        D.Dunning(68)  5  1   37  4   4
63   0     @   9  5   2 39   0   0  3         T.Miller(18)  9  2   39  9   9
64   0        12  7   1 40   0   0  4        L.Giolito(21) 12  5   40 13  13
65   0         0  8   0 30   0   0  2          J.Cueto(76)  3  0   30  0   0
66   0         4  5   1 34   0   0  3         M.Kopech(40)  8  2   34  4   4
67   0         8  5   2 38   0   0  7       T.Williams(41) 10  3   38  8   8
68   0         5  7   1 35   0   0  2       C.Carrasco(29)  7  3   35  5   5
69   0     @   6  5   4 40   0   0  2        J.Taillon(28) 11  2   40  6   6
70   0     @   3 10   2 35   0   0  3       L.Severino(55)  5  1   35  3   3
71   0     @   3 10   1 38   0   0  5           G.Cole(71)  8  2   38  3   3
72   0     @   3 14   1 41   1   0  5         N.Cortes(50)  6  1   41  3   3
73   0     @   9 10   0 42   0   0  5       C.Carrasco(28) 12  3   42  9   9
74   0     @   2  6   1 36   0   0  2         T.Walker(71)  7  1   36  2   2
75   0         2  7   2 29   0   0  3       L.Severino(60)  3  0   29  2   2
76   0         8  6   2 38   1   0  4       M.Lorenzen(14) 11  3   38  8   8
77   0         9 14   2 40   0   0  2       P.Sandoval(38) 12  5   40  9   9
78   0         4  6   2 38   0   0  3         J.Suarez(52) 10  2   38  4   4
79   0         7  5   0 39   0   1  6        J.Heasley(61)  7  1   39  7   7
80   0         9  5   2 40   1   0  4        Z.Greinke(23) 13  4   40  9   9
81   0         4  6   2 38   0   0  5         B.Keller(43)  7  1   38  4   4
82   0         5  8   2 40   0   0 10          K.Bubic(47)  8  2   40  5   5
83   0     @   8 13   5 44   1   0  3      P.Blackburn(29) 14  2   44  8   8
84   1     @   2  5   1 35   0   0  2          Z.Logue(54)  5  0   35  2   2
85   0     @   6  4   4 38   0   0  3          C.Irvin(56)  9  1   38  6   6
86   0     @   5  9   2 43   1   0  7    N.Syndergaard(43)  8  1   43  6   6
87   0     @   1 15   1 34   1   0  3         S.Ohtani(70)  4  0   34  1   1
88   0     @   3 10   0 40   0   0  4        R.Detmers(57)  7  0   40  3   3
89   0         1  8   1 33   0   0  3          C.Irvin(65)  4  0   33  1   1
90   0         5  4   0 32   0   0  2         J.Koenig(46)  6  1   32  5   5
91   0         3  8   1 37   1   0  1          A.Oller(41)  8  2   37  3   3
92   0         3 10   2 36   0   0  2     J.Montgomery(58) 10  0   36  3   3
93   0         7  5   2 36   1   0  1         D.Germán(28)  7  3   36  7   7
94   0     @   5  4   2 37   0   0  1       M.Gonzales(32) 10  3   37  5   5
95   1     @   2 10   3 36   0   0  2        L.Gilbert(61)  7  0   36  3   3
96   0     @   8  7   3 40   0   0  3            R.Ray(16) 12  2   40  8   8
97   0     @   3  7   3 38   0   0  3          A.Oller(47)  7  2   38  5   5
98   0     @   2  8   2 36   0   0  3         F.Montas(44)  7  1   36  3   3
99   0     @   2  5   2 34   0   1  2          C.Irvin(64)  5  1   34  2   2
100  0         3  8   3 33   0   0  2        L.Gilbert(58)  6  1   33  4   4
101  0        11  5   2 47   0   0  7            R.Ray(31) 15  4   47 11  11
102  0         4  3   3 39   0   0  4         C.Flexen(51)  9  1   39  4   4
103  0         2 11   1 39   0   0  3          G.Kirby(52)  7  0   39  3   3
104  0         2  9   2 36   0   0  3        N.Eovaldi(63)  6  0   36  2   2
105  0         1  8   2 37   0   0  2       K.Crawford(59)  9  0   37  1   1
106  0         6  6   4 36   0   0  0           R.Hill(32) 12  1   36  6   6
107  0     @   6  6   2 44   0   0  6         Z.Plesac(32) 11  2   44  6   6
108  0     @   9  4   2 41   0   0  2         H.Gaddis(14) 14  2   41  9   9
109  0     @   1  8   4 33   0   0  1      C.Quantrill(69)  6  0   33  1   1
110  0     @   0 10   0 29   0   0  1       T.McKenzie(85)  2  0   29  0   0
111  0         7  4   2 33   0   0  3          M.Pérez(26)  7  1   33  7   7
112  0         4 10   0 44   0   0  5           G.Otto(52)  8  2   44  4   4
113  0         7  5   1 37   0   0  3         C.Ragans(29) 10  2   37  7   7
114  0         7  4   2 37   0   0  4          A.Oller(45) 11  1   37  7   7
115  0         8  4   2 36   0   2  3          Z.Logue(28) 12  1   36  8   8
116  0         6  2   2 35   0   0  1          C.Irvin(36) 10  1   35  6   6
117  0     @   2  3   1 37   0   0  2          J.Cueto(66)  7  0   37  2   2
118  0     @   3  9   4 39   0   0  4          D.Cease(44)  9  1   39  3   3
119  0     @   3  6   2 35   0   0  3         M.Kopech(50)  5  0   35  3   3
120  0     @  21  9   5 55   0   0  4        L.Giolito(19) 25  4   55 21  21
121  0     @   2 12   2 34   0   0  1         K.Wright(58)  7  1   34  2   2
122  0     @   4 16   1 44   0   0  3        S.Strider(69)  7  1   44  4   4
123  0     @   5 14   0 41   0   0  4         C.Morton(63) 10  0   41  5   5
124  0         4  9   3 36   0   0  1        A.Sanchez(45) 12  1   36  4   4
125  0         5  1   3 31   0   0  3          D.Bundy(52)  6  2   31  5   5
126  0         5  7   3 35   0   0  3         C.Archer(27) 11  1   35  6   6
127  0         0  7   0 33   0   0  2        K.Bradish(82)  4  0   33  0   0
128  0         1  6   1 29   0   0  0         D.Kremer(70)  4  0   29  1   1
129  0         3  6   3 33   0   0  3           A.Voth(67)  6  1   33  3   3
130  0     @   4  8   1 40   1   0  6        D.Dunning(45)  8  1   40  4   4
131  0     @   5 11   1 45   0   0  7          M.Pérez(30) 11  0   45  5   5
132  0     @   4  9   3 38   0   0  4        R.Detmers(37)  7  0   38  4   4
133  0     @   1  9   2 44   0   0  1         S.Ohtani(71)  7  0   44  1   1
134  0     @   9  6   2 41   0   0  3       T.Davidson(33) 11  2   41  9   9
135  0         1  6   1 31   0   0  1          M.Pérez(65)  8  0   31  1   1
136  0         3  9   0 39   0   0  3           G.Otto(46)  8  1   39  3   3
137  1         3  6   0 39   0   0  8         C.Ragans(59)  4  1   39  4   4
138  0         4  5   1 35   0   0  7       M.Lorenzen(57)  6  2   35  4   4
139  0         0 10   2 34   0   0  2         S.Ohtani(56)  7  0   34  1   1
140  0        11  9   1 44   0   0  8       T.Davidson(31) 12  5   44 12  12
141  0     @   6  5   2 42   0   0  2      E.Rodriguez(28) 13  0   42  7   7
142  0     @   6  4   2 41   1   0  1      D.Hutchison(36) 12  3   41  6   6
143  1     @   2  7   1 37   0   0  4          J.Wentz(50)  5  1   37  2   2
144  0         5  6   4 37   0   0  4     J.Kaprielian(54)  9  1   37  5   5
145  0         5  8   1 36   0   0  3       A.Martinez(46)  8  4   36  5   5
146  0         5  1   1 35   0   0  0          C.Irvin(48) 10  4   35  5   5
147  0        11  8   3 41   0   0  3      K.Waldichuk(29) 15  1   41 11  11
148  0     @   4  5   1 34   0   0  1      D.Rasmussen(46)  6  1   34  4   4
149  0     @   5  6   2 38   0   0  5     S.McClanahan(31)  8  1   38  5   5
150  0     @   5  3   1 38   0   0  1         C.Kluber(62) 10  2   38  5   5
151  0     @   0 11   0 29   0   0  0        K.Bradish(90)  2  0   29  0   0
152  0     @   0  6   1 31   0   0  2         D.Kremer(83)  4  0   31  0   0
153  0     @  11  7   3 43   0   0  6        M.Baumann(48) 12  1   43 11  11
154  0     @   5  9   3 44   0   0  4           A.Voth(61)  9  0   44  6   6
155  0        10  5   1 44   0   0  5         Z.Davies(36) 14  5   44 10  10
156  0         2  9   1 38   0   0  3         Z.Gallen(62)  7  1   38  2   2
157  0         3  5   4 34   0   1  0      D.Rasmussen(62)  7  1   34  3   3
158  1         1  5   2 31   0   0  1     S.McClanahan(50)  6  0   31  2   2
159  0         3  5   1 35   1   0  1         C.Kluber(50) 10  1   35  3   3
160  0         0 12   0 29   0   0  0           A.Nola(79)  2  0   29  0   0
161  0        10  4   5 43   0   0  4         R.Suárez(21) 17  3   43 10  10
162  0         3  7   2 33   0   1  2         B.Falter(49) 12  1   33  3   3
    H.1 SB   SLG   OPS ROE.1 PA.2 ROE.2 SLG.1 Opp..Starter..GmeSc..1   Rslt
1     8  1 0.514 0.804     0   38     0 0.514           S.Ohtani(60)   W3-1
2    14  1 0.707 1.052     0   43     0 0.707          R.Detmers(49)  W13-6
3     2  1 0.529 0.821     1   32     1 0.529      N.Syndergaard(63)   L0-2
4     7  0 0.457 0.753     0   39     0 0.457           J.Suarez(49)   W4-1
5     8  0 0.442 0.746     1   39     1 0.442        M.Bumgarner(53)   W2-1
6     6  1 0.398 0.692     0   40     0 0.398            M.Kelly(66)   L2-3
7     5  0 0.371 0.653     0   32     0 0.371         M.Gonzales(71)  L1-11
8     8  0 0.380 0.662     0   38     0 0.380           C.Flexen(52)   W4-0
9     4  0 0.372 0.661     0   35     0 0.372            M.Brash(55)   L2-7
10    9  0 0.385 0.686     0   40     0 0.385         M.Lorenzen(36)   W8-3
11    6  0 0.380 0.677     1   37     1 0.380         P.Sandoval(55)   L2-7
12    1  0 0.355 0.637     0   29     0 0.355           S.Ohtani(81)   L0-6
13    7  0 0.346 0.625     0   36     0 0.346        R.Stripling(41)   L3-4
14    8  0 0.344 0.622     0   35     0 0.344           A.Manoah(55)   L2-3
15   11  0 0.362 0.647     1   44     1 0.362          Y.Kikuchi(42)   W8-7
16    8  2 0.361 0.646     0   38     0 0.361          D.Dunning(55)   L2-6
17    6  0 0.358 0.643     0   36     0 0.358            T.Hearn(44)   W5-1
18    7  0 0.356 0.641     1   38     1 0.356             G.Otto(50)   W4-3
19    3  0 0.350 0.630     0   32     0 0.350            M.Pérez(73)   W3-2
20   14  0 0.372 0.663     0   48     0 0.372          Y.Kikuchi(35)  W11-7
21    8  0 0.370 0.661     1   39     1 0.370          J.Berríos(54)   L1-2
22    8  2 0.369 0.657     1   35     1 0.369          K.Gausman(67)   L2-3
23    8  0 0.376 0.664     0   34     0 0.376         M.Gonzales(44)   W3-0
24    5  1 0.376 0.666     0   34     0 0.376           C.Flexen(58)   W4-0
25   10  0 0.378 0.672     0   37     0 0.378            M.Brash(30)   W7-2
26    8  0 0.382 0.676     0   33     0 0.382           T.Skubal(61)   W3-2
27    7  1 0.384 0.680     0   36     0 0.384          B.Brieske(45)   W3-2
28    4  0 0.382 0.678     0   34     0 0.382        E.Rodriguez(73)   W3-2
29    5  0 0.383 0.679     0   34     0 0.383          W.Peralta(54)   W5-0
30    7  2 0.378 0.678     0   45     0 0.378             J.Ryan(36)   W5-0
31   15  0 0.387 0.691     0   45     0 0.387           C.Archer(30)  W11-3
32    9  2 0.391 0.697     0   41     0 0.391           J.Winder(33)   W5-0
33    7  0 0.396 0.701     0   36     0 0.396             J.Gray(39)   W6-1
34   12  1 0.401 0.709     1   43     1 0.401            E.Fedde(43)  L6-13
35   11  1 0.408 0.717     0   40     0 0.408           P.Corbin(43)   W8-0
36    7  0 0.408 0.718     0   38     0 0.408         G.Whitlock(54)   L3-6
37   15  0 0.422 0.734     1   45     1 0.422           N.Eovaldi(9)  W13-4
38    2  0 0.417 0.724     0   29     0 0.417          N.Pivetta(87)   L1-5
39   10  3 0.417 0.728     0   38     0 0.417             G.Otto(49)   W5-1
40    8  0 0.414 0.724     0   32     0 0.414            M.Pérez(75)   L0-3
41    6  2 0.412 0.721     0   31     0 0.412             J.Gray(54)   W2-1
42    8  0 0.413 0.724     0   36     0 0.413            T.Hearn(36)   W5-2
43    4  0 0.410 0.718     0   32     0 0.410         T.McKenzie(69)   L1-6
44    9  0 0.410 0.718     0   35     0 0.410           Z.Plesac(22)   W7-3
45    7  1 0.408 0.717     0   33     0 0.408        C.Quantrill(51)   W2-1
46    9  1 0.405 0.714     0   37     0 0.405           C.Flexen(63)   L1-6
47    5  0 0.401 0.707     0   34     0 0.401          L.Gilbert(74)   L0-6
48    6  1 0.399 0.704     0   35     0 0.399         M.Gonzales(61)   W2-1
49    6  1 0.401 0.706     1   38     1 0.401        P.Blackburn(53)   W5-1
50    7  0 0.400 0.704     0   36     0 0.400           F.Montas(60)   W3-1
51   11  0 0.399 0.705     0   42     0 0.399            C.Irvin(53)   W5-4
52   14  0 0.404 0.714     0   42     0 0.404           B.Singer(27)  W10-3
53    5  1 0.400 0.709     1   37     1 0.400            K.Bubic(57)   L0-6
54   12  0 0.404 0.716     0   45     0 0.404          J.Heasley(49)   W7-4
55   10  2 0.408 0.720     1   40     1 0.408              R.Ray(37)   L4-7
56    7  1 0.406 0.719     0   35     0 0.406           C.Flexen(55)   W4-1
57    8  0 0.405 0.718     0   36     0 0.405          L.Gilbert(46)   L3-6
58   11  1 0.407 0.721     0   42     0 0.407            P.López(46)   L4-7
59    8  1 0.407 0.720     1   37     1 0.407          B.Garrett(59)   L1-5
60   14  1 0.412 0.728     0   41     0 0.412          E.Cabrera(26)   W9-4
61    7  1 0.409 0.725     0   36     0 0.409            T.Hearn(42)   L3-5
62    5  0 0.408 0.723     0   37     0 0.408          D.Dunning(68)   W4-3
63    9  0 0.409 0.724     0   39     0 0.409           T.Miller(18)   W9-2
64   12  0 0.416 0.733     0   40     0 0.416          L.Giolito(21)  W13-3
65    3  0 0.412 0.727     0   30     0 0.412            J.Cueto(76)   L0-7
66    8  0 0.413 0.728     0   34     0 0.413           M.Kopech(40)   W4-3
67   10  1 0.416 0.734     0   38     0 0.416         T.Williams(41)   W8-2
68    7  0 0.418 0.735     0   35     0 0.418         C.Carrasco(29)   W5-3
69   11  0 0.420 0.738     0   40     0 0.420          J.Taillon(28)   L6-7
70    5  0 0.419 0.736     0   35     0 0.419         L.Severino(55)   W3-1
71    8  1 0.420 0.737     0   38     0 0.420             G.Cole(71)   W3-0
72    6  3 0.418 0.734     1   41     1 0.418           N.Cortes(50)   L3-6
73   12  1 0.420 0.738     0   42     0 0.420         C.Carrasco(28)   W9-1
74    7  0 0.419 0.736     0   36     0 0.419           T.Walker(71)   W2-0
75    3  0 0.416 0.733     0   29     0 0.416         L.Severino(60)   W2-1
76   11  0 0.420 0.737     1   38     1 0.420         M.Lorenzen(14)   W8-1
77   12  1 0.425 0.743     0   40     0 0.425         P.Sandoval(38)   W9-1
78   10  0 0.426 0.744     0   38     0 0.426           J.Suarez(52)   W4-2
79    7  0 0.425 0.744     0   39     0 0.425          J.Heasley(61)   W7-6
80   13  0 0.430 0.750     1   40     1 0.430          Z.Greinke(23)   W9-7
81    7  0 0.429 0.749     0   38     0 0.429           B.Keller(43)   L4-7
82    8  0 0.431 0.752     0   40     0 0.431            K.Bubic(47)   W5-2
83   14  0 0.433 0.756     1   44     1 0.433        P.Blackburn(29)   W8-3
84    5  0 0.431 0.752     0   35     0 0.431            Z.Logue(54)   L2-3
85    9  1 0.431 0.753     0   38     0 0.431            C.Irvin(56)   W6-1
86    8  2 0.430 0.752     1   43     1 0.430      N.Syndergaard(43)   W6-5
87    4  2 0.427 0.748     1   34     1 0.427           S.Ohtani(70)   L1-7
88    7  0 0.425 0.745     0   40     0 0.425          R.Detmers(57)   W3-2
89    4  0 0.422 0.742     0   33     0 0.422            C.Irvin(65)   L1-5
90    6  0 0.421 0.740     0   32     0 0.421           J.Koenig(46)   W5-0
91    8  0 0.421 0.739     1   37     1 0.421            A.Oller(41)   L3-4
92   10  0 0.420 0.739     0   36     0 0.420       J.Montgomery(58)   W3-2
93    7  1 0.422 0.740     1   36     1 0.422           D.Germán(28)   W7-5
94   10  1 0.424 0.741     0   37     0 0.424         M.Gonzales(32)   W5-2
95    7  0 0.422 0.740     0   36     0 0.422          L.Gilbert(61)   W3-1
96   12  0 0.424 0.742     0   40     0 0.424              R.Ray(16)   W8-5
97    7  2 0.425 0.743     0   38     0 0.425            A.Oller(47)   L5-7
98    7  0 0.424 0.741     0   36     0 0.424           F.Montas(44)   L3-5
99    5  0 0.424 0.740     0   34     0 0.424            C.Irvin(64)   L2-4
100   6  1 0.423 0.739     0   33     0 0.423          L.Gilbert(58)   W4-2
101  15  0 0.427 0.745     0   47     0 0.427              R.Ray(31)  W11-1
102   9  0 0.427 0.746     0   39     0 0.427           C.Flexen(51)   L4-5
103   7  2 0.425 0.743     0   39     0 0.425            G.Kirby(52)   W3-2
104   6  0 0.424 0.741     0   36     0 0.424          N.Eovaldi(63)   L2-3
105   9  1 0.422 0.740     0   37     0 0.422         K.Crawford(59)   L1-2
106  12  0 0.424 0.741     0   36     0 0.424             R.Hill(32)   W6-1
107  11  0 0.425 0.743     0   44     0 0.425           Z.Plesac(32)   W6-0
108  14  0 0.426 0.745     0   41     0 0.426           H.Gaddis(14)   W9-3
109   6  0 0.425 0.743     0   33     0 0.425        C.Quantrill(69)   L1-4
110   2  0 0.423 0.739     0   29     0 0.423         T.McKenzie(85)   L0-1
111   7  1 0.422 0.739     0   33     0 0.422            M.Pérez(26)   W7-5
112   8  0 0.422 0.738     0   44     0 0.422             G.Otto(52)   L4-8
113  10  0 0.423 0.740     0   37     0 0.423           C.Ragans(29)   W7-3
114  11  1 0.423 0.741     0   37     0 0.423            A.Oller(45)   W7-5
115  12  1 0.425 0.744     0   36     0 0.425            Z.Logue(28)   W8-0
116  10  0 0.425 0.744     0   35     0 0.425            C.Irvin(36)   W6-3
117   7  1 0.424 0.742     0   37     0 0.424            J.Cueto(66)   L2-4
118   9  0 0.424 0.742     0   39     0 0.424            D.Cease(44)   L3-4
119   5  2 0.423 0.740     0   35     0 0.423           M.Kopech(50)   W3-2
120  25  1 0.428 0.748     0   55     0 0.428          L.Giolito(19)  W21-5
121   7  0 0.427 0.747     0   34     0 0.427           K.Wright(58)   L2-6
122   7  0 0.426 0.744     0   44     0 0.426          S.Strider(69)   L4-5
123  10  4 0.424 0.743     0   41     0 0.424           C.Morton(63)   W5-4
124  12  0 0.425 0.745     0   36     0 0.425          A.Sanchez(45)   W4-2
125   6  0 0.426 0.746     0   31     0 0.426            D.Bundy(52)   W5-3
126  11  0 0.427 0.747     0   35     0 0.427           C.Archer(27)   W6-3
127   4  0 0.425 0.744     0   33     0 0.425          K.Bradish(82)   L0-2
128   4  0 0.423 0.742     0   29     0 0.423           D.Kremer(70)   L1-3
129   6  0 0.423 0.742     0   33     0 0.423             A.Voth(67)   W3-1
130   8  0 0.423 0.741     1   40     1 0.423          D.Dunning(45)   W4-2
131  11  0 0.422 0.741     0   45     0 0.422            M.Pérez(30)   W5-3
132   7  1 0.421 0.740     0   38     0 0.421          R.Detmers(37)   W4-2
133   7  2 0.419 0.737     0   44     0 0.419           S.Ohtani(71)   L1-2
134  11  0 0.420 0.739     0   41     0 0.420         T.Davidson(33)   W9-1
135   8  0 0.419 0.738     0   31     0 0.419            M.Pérez(65)   W1-0
136   8  5 0.419 0.737     0   39     0 0.419             G.Otto(46)   L3-4
137   4  0 0.417 0.735     0   39     0 0.417           C.Ragans(59)   W4-3
138   6  0 0.418 0.736     0   35     0 0.418         M.Lorenzen(57)   W4-3
139   7  0 0.417 0.735     0   34     0 0.417           S.Ohtani(56)   L1-6
140  12  1 0.420 0.739     0   44     0 0.420         T.Davidson(31)  W12-4
141  13  2 0.419 0.739     0   42     0 0.419        E.Rodriguez(28)   W7-0
142  12  0 0.421 0.741     1   41     1 0.421        D.Hutchison(36)   W6-3
143   5  0 0.420 0.740     0   37     0 0.420            J.Wentz(50)   W2-1
144   9  0 0.420 0.741     0   37     0 0.420       J.Kaprielian(54)   W5-2
145   8  0 0.422 0.743     0   36     0 0.422         A.Martinez(46)   W5-0
146  10  0 0.424 0.744     0   35     0 0.424            C.Irvin(48)   L5-8
147  15  2 0.425 0.746     0   41     0 0.425        K.Waldichuk(29)  W11-2
148   6  0 0.424 0.744     0   34     0 0.424        D.Rasmussen(46)   W4-0
149   8  0 0.424 0.744     0   38     0 0.424       S.McClanahan(31)   W5-0
150  10  1 0.424 0.745     0   38     0 0.424           C.Kluber(62)   W5-2
151   2  0 0.422 0.741     0   29     0 0.422          K.Bradish(90)   L0-2
152   4  0 0.421 0.739     0   31     0 0.421           D.Kremer(83)   L0-6
153  12  2 0.421 0.741     0   43     0 0.421          M.Baumann(48) W11-10
154   9  0 0.421 0.740     0   44     0 0.421             A.Voth(61)   W6-3
155  14  1 0.423 0.744     0   44     0 0.423           Z.Davies(36)  W10-2
156   7  1 0.423 0.743     0   38     0 0.423           Z.Gallen(62)   L2-5
157   7  0 0.423 0.742     0   34     0 0.423        D.Rasmussen(62)   L3-7
158   6  1 0.422 0.741     0   31     0 0.422       S.McClanahan(50)   W2-1
159  10  0 0.422 0.741     1   35     1 0.422           C.Kluber(50)   W3-1
160   2  0 0.420 0.738     0   29     0 0.420             A.Nola(79)   L0-3
161  17  0 0.423 0.742     0   43     0 0.423           R.Suárez(21)  W10-0
162  12  0 0.424 0.743     0   33     0 0.424           B.Falter(49)   W3-2
       BA Gtm LOB Opp AB X3B.1 Thr
1   0.229   1   8 LAA 35     0   R
2   0.293   2   3 LAA 40     0   L
3   0.231   3   5 LAA 29     0   R
4   0.225   4   8 LAA 34     0   L
5   0.227   5  10 ARI 34     0   L
6   0.218   6   9 ARI 34     0   R
7   0.211   7   4 SEA 31     0   L
8   0.214   8   7 SEA 34     1   R
9   0.208   9   6 SEA 27     0   R
10  0.215  10   8 LAA 32     0   R
11  0.212  11   8 LAA 33     0   L
12  0.199  12   2 LAA 28     0   R
13  0.200  13   6 TOR 34     0   R
14  0.203  14   6 TOR 34     0   R
15  0.209  15   9 TOR 38     0   L
16  0.211  16   9 TEX 35     0   R
17  0.209  17   4 TEX 32     0   L
18  0.209  18   7 TEX 34     0   R
19  0.204  19   2 TEX 30     0   L
20  0.213  20  10 TOR 38     0   L
21  0.214  21  11 TOR 36     0   R
22  0.214  22   6 TOR 35     1   R
23  0.216  23   7 SEA 32     0   L
24  0.215  24   6 SEA 28     0   R
25  0.219  25   6 SEA 31     0   R
26  0.220  26   6 DET 31     0   L
27  0.220  27   9 DET 31     0   R
28  0.218  28   7 DET 28     1   L
29  0.217  29   5 DET 28     0   R
30  0.217  30  13 MIN 33     0   R
31  0.223  31   7 MIN 41     0   R
32  0.224  32   9 MIN 35     0   R
33  0.223  33   3 WSN 33     0   R
34  0.226  34  10 WSN 38     1   R
35  0.229  35   5 WSN 37     0   L
36  0.229  36   8 BOS 31     0   R
37  0.233  37   5 BOS 43     0   R
38  0.229  38   1 BOS 29     0   R
39  0.231  39   9 TEX 31     0   R
40  0.232  40   5 TEX 30     0   L
41  0.232  41   5 TEX 29     1   R
42  0.232  42   7 TEX 31     0   L
43  0.230  43   4 CLE 30     0   R
44  0.231  44   4 CLE 33     0   R
45  0.232  45   7 CLE 27     0   R
46  0.232  46   9 SEA 35     0   R
47  0.231  47   7 SEA 32     0   R
48  0.230  48   6 SEA 32     0   L
49  0.229  49   6 OAK 34     1   R
50  0.228  50   6 OAK 32     0   R
51  0.230  51  10 OAK 36     0   L
52  0.233  52   5 KCR 38     0   R
53  0.232  53  10 KCR 32     0   L
54  0.234  54  11 KCR 37     1   R
55  0.235  55   9 SEA 35     0   L
56  0.235  56   7 SEA 30     0   R
57  0.235  57   6 SEA 33     0   R
58  0.236  58  11 MIA 37     0   R
59  0.236  59   9 MIA 35     0   L
60  0.239  60   8 MIA 35     0   R
61  0.238  61   6 TEX 33     0   L
62  0.237  62   6 TEX 32     0   R
63  0.237  63   3 TEX 35     0   R
64  0.239  64   3 CHW 35     0   R
65  0.237  65   3 CHW 28     0   R
66  0.238  66   6 CHW 31     0   R
67  0.239  67   6 NYM 31     0   R
68  0.239  68   6 NYM 31     0   R
69  0.240  69   7 NYY 37     0   R
70  0.239  70   5 NYY 31     0   R
71  0.239  71   8 NYY 33     0   R
72  0.238  72   9 NYY 36     0   L
73  0.239  73   6 NYM 37     0   R
74  0.238  74   7 NYM 33     0   R
75  0.237  75   3 NYY 26     0   R
76  0.238  76   6 LAA 33     0   R
77  0.240  77   7 LAA 37     0   L
78  0.240  78   8 LAA 35     0   L
79  0.240  79   6 KCR 32     1   R
80  0.242  80   7 KCR 35     0   R
81  0.241  81   7 KCR 33     0   R
82  0.242  82  11 KCR 29     0   L
83  0.243  83   9 OAK 41     0   R
84  0.242  84   6 OAK 31     0   L
85  0.243  85   5 OAK 34     0   L
86  0.242  86  10 LAA 36     0   R
87  0.241  87   6 LAA 31     0   R
88  0.241  88   8 LAA 34     0   L
89  0.240  89   5 OAK 29     0   L
90  0.239  90   3 OAK 30     0   L
91  0.239  91   7 OAK 36     0   R
92  0.240  92   7 NYY 34     0   L
93  0.240  93   5 NYY 32     0   R
94  0.240  94   5 SEA 35     0   L
95  0.240  95   6 SEA 32     0   R
96  0.241  96   5 SEA 37     0   L
97  0.240  97   6 OAK 34     0   R
98  0.240  98   6 OAK 33     0   R
99  0.239  99   5 OAK 32     1   L
100 0.239 100   5 SEA 30     0   R
101 0.241 101  12 SEA 38     0   L
102 0.241 102   8 SEA 35     0   R
103 0.241 103   9 SEA 35     0   R
104 0.240 104   7 BOS 32     0   R
105 0.240 105   9 BOS 35     0   R
106 0.241 106   6 BOS 34     0   L
107 0.242 107  11 CLE 38     0   R
108 0.243 108   5 CLE 38     0   R
109 0.243 109   5 CLE 32     0   R
110 0.241 110   2 CLE 28     0   R
111 0.241 111   2 TEX 29     0   L
112 0.241 112  11 TEX 38     0   R
113 0.242 113   6 TEX 33     0   L
114 0.242 114   6 OAK 32     0   R
115 0.243 115   4 OAK 33     2   L
116 0.244 116   5 OAK 34     0   L
117 0.244 117   8 CHW 33     0   R
118 0.244 118   9 CHW 35     0   R
119 0.243 119   5 CHW 30     0   R
120 0.246 120   7 CHW 51     0   R
121 0.246 121   5 ATL 33     0   R
122 0.245 122   9 ATL 40     0   R
123 0.246 123   9 ATL 36     0   R
124 0.247 124   8 MIN 34     0   R
125 0.246 125   2 MIN 25     0   R
126 0.247 126   5 MIN 32     0   R
127 0.246 127   6 BAL 30     0   R
128 0.246 128   1 BAL 29     0   R
129 0.245 129   6 BAL 28     0   R
130 0.245 130   9 TEX 33     0   R
131 0.246 131  13 TEX 37     0   L
132 0.246 132   7 LAA 33     0   L
133 0.245 133  10 LAA 42     0   R
134 0.245 134   5 LAA 36     0   L
135 0.246 135   6 TEX 30     0   L
136 0.245 136   9 TEX 35     0   R
137 0.245 137   7 TEX 30     0   L
138 0.244 138   7 LAA 28     0   R
139 0.244 139   6 LAA 31     0   R
140 0.245 140   8 LAA 35     0   L
141 0.246 141   8 DET 39     0   L
142 0.246 142   8 DET 39     0   R
143 0.246 143   8 DET 30     0   L
144 0.246 144   8 OAK 32     0   R
145 0.246 145   7 OAK 32     0   R
146 0.246 146   3 OAK 35     0   L
147 0.248 147   6 OAK 38     0   L
148 0.247 148   3 TBR 33     0   R
149 0.247 149   6 TBR 32     0   L
150 0.247 150   6 TBR 36     0   R
151 0.246 151   2 BAL 29     0   R
152 0.246 152   4 BAL 29     0   R
153 0.246 153   5 BAL 36     0   R
154 0.246 154   7 BAL 37     0   R
155 0.247 155  10 ARI 37     0   R
156 0.247 156   7 ARI 35     0   R
157 0.247 157   4 TBR 34     1   R
158 0.246 158   5 TBR 29     0   L
159 0.247 159   8 TBR 34     0   R
160 0.246 160   2 PHI 29     0   R
161 0.247 161   9 PHI 39     0   L
162 0.248 162   6 PHI 31     1   L
mlr_model <- lm(astros_data$HR ~ astros_data$R + astros_data$H, data.frame = testing_data, main = "Sdasdasdsa")
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
 extra arguments 'data.frame', 'main' will be disregarded
summary(mlr_model)

Call:
lm(formula = astros_data$HR ~ astros_data$R + astros_data$H, 
    data.frame = testing_data, main = "Sdasdasdsa")

Residuals:
    Min      1Q  Median      3Q     Max 
-2.2428 -0.5822 -0.1019  0.4830  2.5993 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)    0.17644    0.21030   0.839    0.403    
astros_data$R  0.31944    0.03988   8.010  2.3e-13 ***
astros_data$H -0.03729    0.03871  -0.963    0.337    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.9289 on 159 degrees of freedom
Multiple R-squared:  0.5157,    Adjusted R-squared:  0.5096 
F-statistic: 84.66 on 2 and 159 DF,  p-value: < 2.2e-16
prediction <- predict(mlr_model)
print("Interpretation: The model seems to be neither overfitting nor underfitting because our R^2 value/RSE value is close to 0.5. Underfitting is usually closer to 0, while overfitting is closer to 1.")
[1] "Interpretation: The model seems to be neither overfitting nor underfitting because our R^2 value/RSE value is close to 0.5. Underfitting is usually closer to 0, while overfitting is closer to 1."