【发布时间】:2020-08-01 01:41:28
【问题描述】:
我有这样的数据
> data
satface1 satface2 satface3 satface 4 ... satface10
Agree Disagree Neutral
Disagree Strongly Disagree Strongly Agree
Agree Disagree Agree
Neutral Agree Neutral
Strongly Agree Neutral Disagree
我想重新编码
Strongly Disagree = 1, Disagree = 2, Neutral = 3, Agree = 4, Disagree = 5
并将它们设为新列(名称 satface1_re、satface2_re....)我该怎么做?
> data
satface1 satface2 satface3 (satface4...10) satface1_re satface2_re satface3_re
Agree Disagree Neutral 4 2 3
Disagree Strongly Disagree Strongly Agree 2 1 5
Agree Disagree Agree 4 2 4
Neutral Agree Neutral 3 4 3
Strongly Agree Neutral Disagree 5 3 2
【问题讨论】: