Infer the role of each player
Usage
ov_infer_player_roles(
x,
target_team,
method,
fall_back = TRUE,
setter_tip_codes = c("PP")
)
Arguments
- x
: a datavolley object (as returned by
datavolley::dv_read()
), a list of datavolley objects, or theplays
component of a datavolley object- target_team
string or function: team to report on. If this is a function, it should return
TRUE
when passed the target team name- method
string: "meta" (rely on player metadata), "SHM" (assume a setter-hitter-middle rotation order), "SMH" (setter-middle-hitter), or "data" (figure out positions from scouting data). Method "meta" is the default if a datavolley object or list of objects is provided
- fall_back
logical: if TRUE and
method
is "meta" and x is a single datavolley object BUT player roles are not provided in the DataVolley file metadata section, fall back to method="data"- setter_tip_codes
character: vector of attack combination codes that correspond to setter tips
Examples
x <- ovdata_example("mlafin_braslovce_nkbm", as = "parsed")
## guess roles according to the actions that the players made
rx <- ov_infer_player_roles(x, target_team = "Nova KBM Branik", method = "data")