0

Retrieving data collected using Google spreadsheets is quite convenient, but if I want to use the R package for example to create a database from this, there is a problem with nominal categories (not-numbers data). I usually use:

library(googlesheets4)
read_sheet(myURL)
data <- read_sheet(myURL)
write.csv(data, 'e:/my_data.csv')

BUT there is a problem with order of categories, after importing 'em into the database. If there is an questions in the survey with so-called likert scales answers (which take into account the level of some characteristics), then I'm interested in the numerical values assigned to the category in the database for the text category, in the order of the idea of scale i.e.

  • 1 = no
  • 2 = probably not
  • 3 = i do not know
  • 4 = rather yes
  • 5 = yes

and who worked a bit on databases knows that the automatic import and inclusion of numbering will depend, e.g. on the order in which the answers appeared in the database - not in what order they are in the survey.

So the question arises - is there either a library responsible for automatically encoding data according to the survey, or maybe some API for Google Forms (Questionnaires) from which I could draw the order of data and adjust it? Maybe some other tool I had not thought about? Of course, I assume that I have access to both the questionnaire / form and the database compatible with it on my Google Account.

zx8754
  • 52,746
  • 12
  • 114
  • 209
kwadratens
  • 187
  • 15
  • I am not sure I fully understand the question, but the gargle package helps with encoding https://cran.r-project.org/web/packages/gargle/gargle.pdf – Susan Switzer Jun 01 '20 at 12:59
  • Thank You, @SusanSwitzer, I realized that I used the wrong word - I meant labeling, not encoding. :) Edited. :) – kwadratens Jun 01 '20 at 15:36

0 Answers0