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

[fix]passでstepが重複するものは1つだけ残す

parent 32ba2199
......@@ -124,6 +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) %>%
distinct(step,.keep_all=TRUE) %>%
select(-c(a_tackle_scc,tackle_scc, pass, a_sameteam, a_sameunum, after_team, after_unum))
return(output)
......@@ -287,7 +288,7 @@ kick_dist <- function(rcg) {
select_name <- function(data,name){
output <- data %>%
dplyr::filter(team==name)
dplyr::filter(team %in% name)
return(output)
}
......@@ -297,8 +298,6 @@ get_AttackLine <- function(data){
filter(px == max(px)) %>%
dplyr::select(
step,
pass_team,
pass_scc,
AL=px
)
return(output)
......@@ -322,11 +321,12 @@ get_MedianLine <- function(data){
get_DynamicPressureLine <- function(data){
data <- data %>%
filter(unum > 1)
filter(unum != 1)
ad <- get_AttackLine(data)
dd <- get_DefendLine(data)
md <- get_MedianLine(data)
output <- dplyr::inner_join(ad,dd,by = "step")
output <- dplyr::inner_join(output,md,by = "step")
output <- dplyr::inner_join(ad,dd,by = "step") %>%
dplyr::inner_join(md,by = "step") %>%
distinct(step,.keep_all=TRUE)
return(output)
}
\ No newline at end of file
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