Hi everyone, I've successfully made my flanker data frame using the text files (1 -22), but the stimulus and response times are appearing as "######e-312" indicating very small numbers. The original time numbers, in the text files, appear as large numbers so I'm thinking the template we were given for the assignment is somehow coercing the large numbers to small numbers? Maybe something to do with function 'fread'?
library(data.table)
library(dplyr)
library(ggplot2)
# get the file names
file_names <- list.files(path="FlankerData")
# create headers for each column
the_headers <- c("stimulus","congruency","proportion",
"block","condition","dualtask","unknown",
"stimulus_onset","response_time","response","subject")
# Load data
# create empty dataframe
all_data<-data.frame()
# loop to add each file to the dataframe
for(i in file_names){
one_subject <- fread(paste("FlankerData/",i, sep=""))
names(one_subject) <- the_headers
one_subject$subject <- rep(i,dim(one_subject)[1])
one_subject <- cbind(one_subject, trial= 1:dim(one_subject)[1])
all_data <- rbind(all_data,one_subject)
}
Hi everyone, I've successfully made my flanker data frame using the text files (1 -22), but the stimulus and response times are appearing as "######e-312" indicating very small numbers. The original time numbers, in the text files, appear as large numbers so I'm thinking the template we were given for the assignment is somehow coercing the large numbers to small numbers? Maybe something to do with function 'fread'?