Commit b81373af authored by Takumi Amano's avatar Takumi Amano 💬
Browse files

[fix]キック後のボールの位置を参照できる

parent 085740a4
......@@ -87,7 +87,9 @@ get_kick <- function(action) {
dplyr::mutate(after_unum = lead(unum)) %>%
dplyr::mutate(a_sameteam = (after_team == team)) %>%
dplyr::mutate(a_sameunum = (after_unum == unum)) %>%
select(-c(command, pvx, pvy, body, neck))
select(-c(command, pvx, pvy, body, neck)) %>%
dplyr::mutate(next_ball_x = lead(ball_x)) %>%
dplyr::mutate(next_ball_y = lead(ball_y))
return(output)
......@@ -122,9 +124,7 @@ get_pass <- function(kick) {
dplyr::mutate(pass_scc = (a_sameteam & !a_sameunum)) %>%
dplyr::mutate(pass = ((a_sameteam & !a_sameunum) | (!a_tackle_scc & !a_sameteam))) %>%
dplyr::filter(pass) %>%
select(-c(a_tackle_scc,tackle_scc, pass, a_sameteam, a_sameunum, after_team, after_unum)) %>%
dplyr::mutate(next_ball_x = lead(ball_x)) %>%
dplyr::mutate(next_ball_y = lead(ball_y))
select(-c(a_tackle_scc,tackle_scc, pass, a_sameteam, a_sameunum, after_team, after_unum))
return(output)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment