Commit 7c1b20e3 authored by Takumi Amano's avatar Takumi Amano 💬
Browse files

[fix]DPL修正

parent 65fb888c
......@@ -518,6 +518,41 @@ add_DynamicPressureLine <- function(action_All,name){
dpl_l <- get_DynamicPressureLine_D(action_l)
dpl_r <- get_DynamicPressureLine_D(action_r)
output <- dplyr::inner_join(action_All,dpl_l,by="step") %>%
dplyr::inner_join(dpl_r,by="step",suffix = c("_l","_r"))
return(output)
}
get_AttackLine_AS <- function(dribble) {
output <- dribble %>%
dplyr::group_by(step) %>%
filter(px == max(px)) %>%
dplyr::select(
step,
AL = px
)
return(output)
}
get_DynamicPressureLine_AS <- function(dribble) {
dribble <- dribble %>%
filter(unum != 1)
ad <- get_AttackLine_AS(dribble)
dd <- get_DefendLine(dribble)
md <- get_MedianLine(dribble)
output <- dplyr::inner_join(ad, dd, by = "step") %>%
dplyr::inner_join(md, by = "step") %>%
distinct(step, .keep_all = TRUE) %>%
dplyr::select(step,AL,ML,DL)
return(output)
}
add_DynamicPressureLine_AS <- function(action_All,name){
action_l <- select_name(action_All,name[1,2])
action_r <- select_name(action_All,name[2,2])
dpl_l <- get_DynamicPressureLine_AS(action_l)
dpl_r <- get_DynamicPressureLine_AS(action_r)
output <- dplyr::inner_join(action_All,dpl_l,by="step") %>%
dplyr::inner_join(dpl_r,by="step",suffix = c("_l","_r"))
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