I have data that looks on the surface as follows:
The data is structured as follows:
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 "
What I want to do is replace the numbers in the V1 vector with the names. Further, I would like to separate each name into distinct columns.
I tried multiple permutations of a recommendation that I found at: How to print names of values in R
Unfortunately, no option I have tried thus far has worked.