rcg_convert.R 362 Bytes
Newer Older
1
2
3
4
5
6
7
get_ball <- function(rcg) {
  ball <- rcg |>
    dplyr::select(
      step, 
      ball_x, 
      ball_y, 
      ball_vx, 
Masaki Ban's avatar
Masaki Ban committed
8
      ball_vy,
9
10
11
12
13
    ) |>
    dplyr::distinct(step, .keep_all = T)
  return(ball)
}

Masaki Ban's avatar
Masaki Ban committed
14
15
get_agent <- function(rcg) {
  agent <- rcg |>
16
17
18
19
20
21
22
23
    dplyr::select(
      step,
      side,
      unum,
      type,
      x,
      y,
    )
Masaki Ban's avatar
Masaki Ban committed
24
  return(agent)
25
}