Like @r2evans said, make your question reproducible. And specify what was the error when you say 'it doesn't work'.
The reason why its failing might be because you are adding new columns with just some of the rows populated. So R doesn't know how to fill the missing rows and you will get a
Error in `$<-.data.frame`(`*tmp*`, "Away_APL", value = c(NA, 10.4752232550593 :
replacement has 2 rows, data has 1153
error.
To tackle this, you can create both columns manually first with a value and then populate the matching rows.
pre_df$Home_APL <- 0
pre_df$Away_APL <- 0
Then run your loop,
# > head(pre_df, 10)
# X date eventId selection home away toverByPrice turnover APL Home_APL Away_APL
# 1 1 01/01/2017 4414294 Arsenal Arsenal Crystal Palace 61883.68 45861.26 1.349367 1.349367 0.000000
# 2 2 01/01/2017 4414294 Crystal Palace Arsenal Crystal Palace 184655.35 17627.82 10.475223 0.000000 10.475223
# 3 3 01/01/2017 4414294 Draw Arsenal Crystal Palace 41557.02 7540.92 5.510868 0.000000 0.000000
# 4 4 01/01/2017 4414399 Draw Watford Tottenham 13851.13 3517.82 3.937418 0.000000 0.000000
# 5 5 01/01/2017 4414399 Tottenham Watford Tottenham 184797.52 114681.12 1.611403 0.000000 1.611403
# 6 6 01/01/2017 4414399 Watford Watford Tottenham 73569.21 12606.46 5.835834 5.835834 0.000000
# 7 7 01/02/2017 4413713 Draw Manchester Utd Hull 8293.93 1130.00 7.339761 0.000000 0.000000
# 8 8 01/02/2017 4413713 Hull Manchester Utd Hull 130880.46 7150.82 18.302860 0.000000 18.302860
# 9 9 01/02/2017 4413713 Manchester Utd Manchester Utd Hull 17798.90 14842.22 1.199207 1.199207 0.000000
# 10 10 01/02/2017 4413852 Draw Stoke Everton 32646.77 9561.08 3.414548 0.000000 0.000000