I import, clean, and merge two different data sets that are created from Qualtrics surveys. I use read.csv to load the data, and I have strip.white=TRUE to remove leading and trailing spaces. If I filter the import data down to a normal day’s import (30 rows or so), this works fine and there is no white space. If I import the entire dataset without filtering the date first in excel (about 1100 rows), it doesn’t strip the white space. I can’t figure it out at all.
The code below is it. That is all of it. I run the r script in chunks to quality check it when there is an issue. This is the first chunk, and the white space is present immediately after pulling in the data. Any thoughts about how what might be wrong or what I can do to fix it?
#define date
testing_date_pipe <- ("071724")
student_file <- paste(testing_date_pipe,"_Student.csv", sep = "")
evaluator_file <- paste (testing_date_pipe,"_Evaluator.csv", sep = "")
#turn on the filter: set the value as 'TRUE' to keep the filter or 'FALSE' to turn it off
#define path to raw data
registration_location <- here::here("data", "raw_data", "1_unified_testing", testing_date_pipe, student_file)
evaluation_location <- here::here("data", "raw_data", "1_unified_testing", testing_date_pipe, evaluator_file)
#load raw data
registration <- read.csv(registration_location, strip.white=TRUE, fileEncoding = "UTF-8")
evaluation <- read.csv(evaluation_location, strip.white=TRUE, fileEncoding = "UTF-8")
Cam McM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
4