2

I've downloaded data from SurveyMonkey using RMonkey into a data frame using the following code:

g <- getresponses(r, s[[1]])
g <- as.data.frame.ts(g)
temp <- edit(g)

Using the data editor, I can see that the data obtained for each respondent is all in one column

view on data editor

I want to be able to find pattern (question ID), make that the header of the column and return all related answer IDs for each respondent within that column.

I have a list of all the question IDs using surveyquestions(s[[1]]), and can count the number of times a question ID (such as "917087271") is used with str_count(g, "917087271") if that helps?

Sorry if I've not explained this well, but would be very grateful for any pointers!

Jaap
  • 81,064
  • 34
  • 182
  • 193
Jane
  • 21
  • 2

0 Answers0