我在征求问题排名时得到了回复,我对每个人的回复如下所示:
structure(list(Rank = "Shifting angler preferences and behaviors;Increasing effort and fishing power;R3 (Recruitment, Retention, and Reactivation);Economic impacts;Climate change;"), row.names = c(NA,
-1L), class = "data.frame")
我尝试创建一个列,根据每个字符串的顺序给出每个Rank的数值。我希望每个字符串有五个列,用";"
分隔,如下所示:
Shifting angler preferences and behaviors
5
Increasing effort and fishing power
4
R3 (Recruitment, Retention, and Reactivation)
3
Economic impacts
2
Climate change
1
这只是一个单一的回应,我们征求了问题的排名,我试图形象化的React。
谢谢!
1条答案
按热度按时间vecaoik11#
猜一猜,我认为您想知道每个以
;
分隔的子字符串在向量中出现的顺序,其中第一个是“最高优先级”(因此是5
),等等。使用增强数据进行演示: