I have this type of data (name: pmt4651) and want to separate and keep only the answers as independent elements (maybe in individual columns so that I can create a function to count and analyze them):
2
{"Q0":"An abstract musical score.\nAn abandoned set of flagpoles.\nA highway with a road sign to its right.\nA shelf protruding from a wall.\n"}3
{"Q0":"An abstract flower.\nA setup diagram for an orchestral percussionist.\nA seating chart diagram for a wedding reception.\nA magic wand.\nA lollipop."}
I tried the separate
and the strsplit
function and to separate them by the "\n" sign but so far I failed. For the strsplit
function I received an error with the note non-character argument
.
With this: sub(pattern = "{"Q0":"", replacement = "", x = pmt4651)
I tried to remove the symbols at the beginning of each row- because this is information I don't need. However, this failed as well.
Does anyone have an idea how I can solve this?