From 50c27ca68ff3f343b30467c0912dd289bf4c46f8 Mon Sep 17 00:00:00 2001 From: Ben Raymond Date: Sat, 20 Jan 2024 07:18:26 +1100 Subject: [PATCH] small fix v1.6.1 --- DESCRIPTION | 2 +- R/validation.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1f73bc3..8833626 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: datavolley Title: Reading and Analyzing DataVolley Scout Files -Version: 1.6.0 +Version: 1.6.1 Authors@R: c(person("Ben", "Raymond", email = "ben@untan.gl", role = c("aut", "cre")), person("Adrien", "Ickowicz", role = "aut"), person("Tyler", "Widdison", role = "aut"), diff --git a/R/validation.R b/R/validation.R index 857f457..6cac8da 100644 --- a/R/validation.R +++ b/R/validation.R @@ -88,7 +88,7 @@ validate_dv <- function(x, validation_level = 2, options = list(), file_type = " pv <- x$meta$players_v pv$team <- visiting_team(x) pv$hv <- "visiting" - plyrs <- bind_rows(ph, pv) + plyrs <- tryCatch(rbind(ph, pv), error = function(e) bind_rows(ph, pv)) ## rbind fails when ph, pv have different columns (can happen with pv files); bind_rows fails when cols have different types dpids <- plyrs$player_id[duplicated(plyrs$player_id)] for (dpid in unique(dpids)) { idx <- plyrs$player_id %eq% dpid