remap_player_info: Change player information

View source: R/cleaning_names.R

remap_player_infoR Documentation

Change player information

Description

An experimental function to replace remap_player_names as a more comprehensive remapping of player attributes.

Usage

remap_player_info(x, remap)

Arguments

x

datavolley: a datavolley object as returned by dv_read, or list of such objects

remap

data.frame: data.frame of strings with columns team, name_from, and any of player_id, firstname, and lastname

Value

A datavolley object or list with corresponding player names changed

Examples

## Not run: 
  x <- dv_read(dv_example_file(), insert_technical_timeouts = FALSE)
  x <- remap_player_info(x, data.frame(team = c("Nova KBM Branik", "BraslovĨe"),
                                       name_from = c("ELA PINTAR", "KATJA MIHALINEC"),
                                       firstname = c("Ela", "Katja"), stringsAsFactors = FALSE))

## End(Not run)


raymondben/datavolley documentation built on April 25, 2024, 10:22 a.m.