On the basis of the vectors Label
and ID
create a character vector formatted
with labels constructed in the same as with newLabel
in the previous exercise, but this time you have to ensure that xxx
always contains three digits. So for a sample with ID nr. 23 and label “High”, the value becomes ID_023_High
.
> head(Label, n = 10)
[1] "Middle" "High" "Low" "High" "Middle" "High" "Middle" "Middle" "High" "Low"
...
> head(ID, n = 10)
[1] 54 115 109 346 298 139 221 447 27 331
...