pv_read.Rd
Read Perana Sports volleyball data file
pv_read( filename, insert_technical_timeouts = FALSE, do_warn = FALSE, extra_validation = 2, raw_only = FALSE, eventgrades = pv_default_eventgrades(), errortypes = pv_default_errortypes(), subevents = pv_default_subevents(), setting_zones, postprocess = NULL )
filename | string: path to file |
---|---|
insert_technical_timeouts | logical: if |
do_warn | logical: should we issue warnings about the contents of the file as we read it? |
extra_validation | numeric: should we run some extra validation checks on the file? 0=no extra validation, 1=check only for major errors, 2=somewhat more extensive, 3=the most extra checking |
raw_only | logical: if |
eventgrades | tibble: a tibble that defines the interpretations of |
errortypes | tibble: a tibble that defines the interpretations of |
subevents | tibble: a tibble that defines the interpretations of |
setting_zones | named character: if the data file has been scouted using setting zones, then each attack will have its associated setting zone (numbered 1 to 5). The setting zone names are not stored in the file, so they can be provided here as a character vector. This can either be an un-named character vector, in which case it must be of length 5; otherwise if only a subset of the five setting zones are being used then it can be provided as a named character vector(e.g. |
postprocess | string or function: function, or name of function, to apply to the peranavolley object as the final step in the processing |
A named list with several elements. raw
contains the extracted but unparsed text from the psvb file, meta
provides match metadata, plays
the play-by-play data in the form of a data.frame, and messages
is a data.frame describing any inconsistencies found in the file.
filename <- pv_example_file() x <- pv_read(filename) x <- pv_read(filename, setting_zones = c("X1", "X2", "X7", "medium/fast", "high"))