I am unsing clear names for my "names" in my measurement data for calculations. Because of data privacy I need to anonymize the solution graphs: I therefore created an assigment table with the "clear" names and random IDs (ids)
.
randos clear
[1,] "d2ef" "01"
[2,] "6326" "02"
[3,] "fc31" "03"
[4,] "02ac" "04"
[5,] "e43a" "05"
[6,] "1ac7" "06"
how can I replace the clear by randos in my colnames()
. A colname for example is T_01_X
. The count and order may be different, because of subset, so I can not set all colnames()
just 1:1 with the assignment table. It need to be search the clear string
and replace it by the randos
.
In the End it should the names be e.g.
"01" in "T_01_X" -> "T_d2ef_X"
as well as
"01" in "A_01_Y" -> "A_d2ef_Y"