Catch error in add_path because of factor/character confusion

This commit is contained in:
Nora Wickelmaier 2024-05-02 19:42:22 +02:00
parent ef56ab792c
commit c3ae475d71

View File

@ -217,6 +217,9 @@ add_path_subdata <- function(subdata, cutoff) {
subdata_path <- lapply(subdata_moves, check_moves, cutoff = cutoff)
subdata <- dplyr::bind_rows(subdata_path)
if (nrow(subdata) != 0) {
subdata$path <- as.factor(subdata$path)
}
subdata
}