Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
2 years ago
by
Takumi Amano
💬
Browse files
Options
Download
Email Patches
Plain Diff
[fix]キック後のボールの位置を参照できる
parent
085740a4
read_rcg
develop
1 merge request
!2
organize branches
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
R/make_data.R
+4
-4
R/make_data.R
with
4 additions
and
4 deletions
+4
-4
R/make_data.R
+
4
-
4
View file @
b81373af
...
@@ -87,7 +87,9 @@ get_kick <- function(action) {
...
@@ -87,7 +87,9 @@ get_kick <- function(action) {
dplyr
::
mutate
(
after_unum
=
lead
(
unum
))
%>%
dplyr
::
mutate
(
after_unum
=
lead
(
unum
))
%>%
dplyr
::
mutate
(
a_sameteam
=
(
after_team
==
team
))
%>%
dplyr
::
mutate
(
a_sameteam
=
(
after_team
==
team
))
%>%
dplyr
::
mutate
(
a_sameunum
=
(
after_unum
==
unum
))
%>%
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
)
return
(
output
)
...
@@ -122,9 +124,7 @@ get_pass <- function(kick) {
...
@@ -122,9 +124,7 @@ get_pass <- function(kick) {
dplyr
::
mutate
(
pass_scc
=
(
a_sameteam
&
!
a_sameunum
))
%>%
dplyr
::
mutate
(
pass_scc
=
(
a_sameteam
&
!
a_sameunum
))
%>%
dplyr
::
mutate
(
pass
=
((
a_sameteam
&
!
a_sameunum
)
|
(
!
a_tackle_scc
&
!
a_sameteam
)))
%>%
dplyr
::
mutate
(
pass
=
((
a_sameteam
&
!
a_sameunum
)
|
(
!
a_tackle_scc
&
!
a_sameteam
)))
%>%
dplyr
::
filter
(
pass
)
%>%
dplyr
::
filter
(
pass
)
%>%
select
(
-
c
(
a_tackle_scc
,
tackle_scc
,
pass
,
a_sameteam
,
a_sameunum
,
after_team
,
after_unum
))
%>%
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
))
return
(
output
)
return
(
output
)
}
}
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets