Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Keisuke ANDO
socceR
Commits
7c1b20e3
Commit
7c1b20e3
authored
Jan 05, 2023
by
Takumi Amano
💬
Browse files
[fix]DPL修正
parent
65fb888c
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/make_data.R
View file @
7c1b20e3
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment