Running R Code

55 views
Skip to first unread message

W VV

unread,
May 28, 2022, 5:37:01 PM5/28/22
to Minno.js
Hello all!

I was hoping I wouldn't have to post and come across the answers in someone else's request, but alas I failed to do so and am still struggling to properly run the R Code on a Qualtrics .csv file.

I'm getting hung up on how to properly extract the info. I'm following the guidance on extraction: https://minnojs.github.io/minnojs-blog/qualtrics/ but it seems to mess up on the lapply function.

# load data from Qualtrics where user id is 'ResponseId', and the CSV is in Q_43'
df = read.csv('/Users/williamvanveen/Desktop/university/Masters Thesis/Data Analysis/Recruiter.csv')

# create list of CSV data frames
csvList = lapply(df[,'IAT.Gender.Career'], function(str) read.csv(text=str,stringsAsFactors = FALSE))

# add id to each data DF
dataPages = mapply(
  function(id, df) cbind(id,df),
  df[,'ResponseId'],
  csvList,
  SIMPLIFY = FALSE
)

# concat pages
do.call(rbind,dataPages)

Anyone have thoughts on what I should be doing to correct this? Is there a package that this requires that I might not have installed/loaded?
Recruiter.csv

Mayan Navon

unread,
Jun 3, 2022, 12:38:45 PM6/3/22
to W VV, Minno.js
Hi,

What is the error message you're getting? Please also read this post in our blog.

Thanks.


--
You received this message because you are subscribed to the Google Groups "Minno.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minnojs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/minnojs/96f49961-ba72-496b-8611-1bf23bb6190an%40googlegroups.com.

W VV

unread,
Jul 28, 2022, 4:14:42 PM7/28/22
to Minno.js
Error I am getting is:

Error in textConnection(text, encoding = "UTF-8") :
  invalid 'text' argument


Reply all
Reply to author
Forward
0 new messages