如何在R中提取和打印值的名称?

时间:2016-04-05 06:45:48

标签: r attributes names

我的数据看起来如下: enter image description here

数据结构如下:

str(minstest)
List of 948
 $ : Named int [1:5] 4 6 11 16 75
  ..- attr(*, "names")= chr [1:5] "Mass " "Bite " "Burn " "Cyst " ...
 $ : Named int 37
  ..- attr(*, "names")= chr "Impaired skin integrity "
 $ : Named int 2
  ..- attr(*, "names")= chr "Abrasion "
 $ : Named int 33
  ..- attr(*, "names")= chr "Infection of nail "
 $ : Named int 34
  ..- attr(*, "names")= chr "Lesion "

我想要做的是用名称替换V1向量中的数字。此外,我想将每个名称分成不同的列。

我尝试了以下建议的多项排列: How to print names of values in R

不幸的是,到目前为止我没有尝试过任何选择。

0 个答案:

没有答案
相关问题