Another way would be:
library(qdap)
library(stringr)
x <- scan(what="character",)
x1 <- c(x,x)
x1 <- paste(x1,collapse=" ")
x2 <- gsub('"',"",bracketXtract(x1,"curly"))
res2 <-
as.data.frame(str_trim(do.call(rbind,genXtract(paste0(x2,","),":",","))),stringsAsFactors=FALSE)
res2[,1:3] <-
Hello,
Maybe something like the following.
x <- scan(what = "character", text = '
{"trial":1,"corr":1,"resp_dur":799,"stim":"â†*Â�*â†*Â�*ââ€
*�*â†*�*â†*�*","cond
":"congruent"},{"trial":2,"corr":1,"resp_dur":0,"stim":"xxââ€
’xx","cond":"
nogo"},{"trial":3,"corr":0,"resp_dur
R Experts -
We have a complex problem whereby Qualtrics exported our data into a single
cell as seen below.
We attempted to parse it using scan() without much success. Hoping to get a
little nudge here. I've posted the full data set here:
https://www.dropbox.com/s/e246uiui6jrux6c/CoopandSelfContr
3 matches
Mail list logo