Read log messages from log files to combine with trial results

read_log_messages(df, messages, .colnames)

Arguments

df

Data frame of trial results, containing column `res_path`

messages

Vector of string messages to detect

.colnames

Vector of column names to insert into `df`

Value

Original data frame with the following columsn added: `.colnames` (boolean), `.colnames_message`, `.colnames_time` , `.colnames_number`, where the last three refer to the first detected message per trial

Examples

# find "killed by magical force" messages in study 2
trials_with_log_messages <-
trials_raw %>%
   read_log_messages("ConfrontedThreat 0 You were killed by a magical force",
                     "killed_by_magical_force" = "...1")
#> Error in trials_raw %>% read_log_messages("ConfrontedThreat 0 You were killed by a magical force",     killed_by_magical_force = "...1"): could not find function "%>%"