Cleaning our survey data, stuck. The first questions turned into 4 variables, each with a 1-0 response

General Tech Learning Aids/Tools 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Learning Aids/Tools related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I need to combine a set of survey responses(outputs) in R into 1 variable that has multiple factor responses. In the outputs below, $Q1-1 through $Q1-5 should be combined into a Factor w/ 5 levels, with Aid =1, Assistant = 2, Owner = 3, Lead = 4, other = 5".

BUT Q1_5 through Q1-_5 through Q1_5_6 are also part of the same 5 factor output. A respondent who selects 5 (other) has the option to write in an answer.

From what I read online I think maybe my issue is due to the data including both logic and factor responses to the same question but, honestly I just don't know what is even causing this error. I can't find anything similar online.

Any suggestions on how to combine the separate Factor 1 level responses while keeping them linked to the Q1_5 responses?

The total output is huge, so Im including just a small section of it below so you can see what I'm trying to explain. I'm filling an empty role on my research team, cleaning up our data for analysis, which means I am learning R as I go. Apologies if I am missing something obvious. Any advice/help/suggestions appreciated!

str(mydatafromR)>
'data.frame':   24 obs. of  456 variables:
 $ ResponseId  : Factor w/ 24 levels 
 ",..: 8 7 15 13 19 20 6 10 16 12 ...
 $ Q1_1        : Factor w/ 1 level "Lead": 1 NA NA 1 1 
1 1 NA NA NA ...
 $ Q1_2        : Factor w/ 1 level "Owner": NA NA 1 1 NA NA 
 NA NA NA NA ...
 $ Q1_3        : Factor w/ 1 level "Assistant": NA NA NA NA 
NA NA NA 1 1 1 ...
 $ Q1_4        : Factor w/ 1 level "Aid": NA 1 NA NA NA NA 
NA NA NA NA ...
 $ Q1_5        : logi  NA NA NA NA NA NA ...
 $ Q1_5_TEXT   : logi  NA NA NA NA NA NA ...
 $ Q1_5_0      : logi  NA NA NA NA NA NA ...
 $ Q1_5_1      : logi  NA NA NA NA NA NA ...
 $ Q1_5_2      : logi  NA NA NA NA NA NA ...
 $ Q1_5_3      : logi  NA NA NA NA NA NA ...
 $ Q1_5_4      : logi  NA NA NA NA NA NA ...
 $ Q1_5_5      : logi  NA NA NA NA NA NA ...
 $ Q1_5_6      : logi  NA NA NA NA NA NA ...

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.