Hello, not sure if this is the right place to ask, but I am quite desperate. I have an assignment due and I don't know some of the required r codes!! I just have two questions.
- I have a data file that has a variable named confident. This variable can have a response ranging from strongly disagree, moderately disagree, neither disagree nor disagree, moderately agree, and strongly agree. These responses are also given points (i.e. 1 point for strongly disagree, 2 points for moderately disagree, 3 points for neither disagree nor disagree and so on). I have many participants in a study that responded to the given response option. The problem is, I need one complete set of r code to create a new variable called confidentpoints which assigns points to each response for the variable. Note that I need to both change the name of the variable and be able to assign points for each response.
- What would be the modification to the code from #1 that I would use to assign points to a reverse coded statement of confident (e.g. shy, thus 5 points for strongly disagree, 4 points for strongly disagree, and so on). Note that I don't need to change the variable name this time, just how I would assign points to a reverse coded statement.