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
b81373af
Commit
b81373af
authored
Sep 28, 2022
by
Takumi Amano
💬
Browse files
[fix]キック後のボールの位置を参照できる
parent
085740a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/make_data.R
View file @
b81373af
...
...
@@ -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
)
}
...
...
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