diff --git a/_manuscript/L2_VWP_webcam_ET.qmd b/_manuscript/L2_VWP_webcam_ET.qmd index bfc774f..fce7b7c 100644 --- a/_manuscript/L2_VWP_webcam_ET.qmd +++ b/_manuscript/L2_VWP_webcam_ET.qmd @@ -119,7 +119,7 @@ language: title-block-correspondence-note: "Correspondence concerning this article should be addressed to" title-block-role-introduction: "Author roles were classified using the Contributor Role Taxonomy (CRediT; https://credit.niso.org/) as follows:" format: - apaquarto-pdf: default + apaquarto-docx: default execute: echo: true warning: false @@ -137,7 +137,6 @@ execute: #| echo: false library(knitr) -library(formatR) opts_chunk$set(fig.align='center', size="small", tidy.opts=list(width.cutoff=60), tidy=TRUE) @@ -397,6 +396,8 @@ Once this is installed, `webgazeR` can be loaded along with additional useful pa ```{r} #| label: packages + + options(stringsAsFactors = FALSE) # no automatic data transformation options("scipen" = 100, "digits" = 10) # suppress math annotation @@ -473,35 +474,36 @@ First, we will create a cleaned up version of our use the behavioral, trial-leve It is important to note here that what the behavioral spreadsheet denotes as trial is not in fact the trial number used in the eye-tracking files. Thus it is imperative you use `spreadhseet row` as trial number to merge the two files successfully. ```{r} -#|message: false -#|echo: true eye_behav_L2 <- L2_data %>% janitor::clean_names() %>% # Select specific columns to keep in the dataset - dplyr::select(participant_private_id, correct, tlpic, trpic, blpic, brpic, condition, eng_targetword, targetword, typetl, typetr, typebl, typebr, zone_name, zone_type,reaction_time, spreadsheet_row, response) %>% + dplyr::select(participant_private_id, correct, tlpic, trpic, blpic, brpic, condition, + eng_targetword, targetword, typetl, typetr, typebl, typebr, zone_name, + zone_type, reaction_time, spreadsheet_row, response) %>% # Filter the rows where 'Zone.Type' equals "response_button_image" dplyr::filter(zone_type == "response_button_image") %>% # Rename columns for easier use and readability dplyr::rename( - "TL" = "tlpic", # Rename 'tlpic' to 'TL' - "TR" = "trpic", # Rename 'trpic' to 'TR' - "BL" = "blpic", # Rename 'blpic' to 'BL' - "BR" = "brpic", # Rename 'brpic' to 'BR' - "targ_loc" = "zone_name", # Rename 'Zone.Name' to 'targ_loc' - "subject" = "participant_private_id", # Rename 'Participant.Private.ID' to 'subject' - "trial" = "spreadsheet_row", # Rename 'spreadsheet_row' to 'trial' - "acc" = "correct", # Rename 'Correct' to 'acc' (accuracy) - "RT" = "reaction_time" # Rename 'Reaction.Time' to 'RT' + TL = tlpic, # Rename 'tlpic' to 'TL' + TR = trpic, # Rename 'trpic' to 'TR' + BL = blpic, # Rename 'blpic' to 'BL' + BR = brpic, # Rename 'brpic' to 'BR' + targ_loc = zone_name, # Rename 'zone_name' to 'targ_loc' + subject = participant_private_id, # Rename 'participant_private_id' to 'subject' + trial = spreadsheet_row, # Rename 'spreadsheet_row' to 'trial' + acc = correct, # Rename 'correct' to 'acc' (accuracy) + RT = reaction_time # Rename 'reaction_time' to 'RT' ) %>% # Convert the 'RT' (Reaction Time) column to numeric type - mutate(RT = as.numeric(RT), - subject=as.factor(subject), - trial=as.factor(trial)) + dplyr::mutate(RT = as.numeric(RT), + subject = as.factor(subject), + trial = as.factor(trial)) + ```